diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/architecture.txt | 38 | ||||
-rw-r--r-- | docs/notes.txt | 55 | ||||
-rw-r--r-- | docs/release.txt | 7 |
3 files changed, 100 insertions, 0 deletions
diff --git a/docs/architecture.txt b/docs/architecture.txt new file mode 100644 index 0000000..fb2d724 --- /dev/null +++ b/docs/architecture.txt | |||
@@ -0,0 +1,38 @@ | |||
1 | architecture | ||
2 | ============ | ||
3 | |||
4 | statix has the following components: | ||
5 | * bin: the CLI/entrypoint | ||
6 | * lib: library of lints and utilities to define these lints | ||
7 | * vfs: virtual filesystem | ||
8 | * macros: procedural macros to help define a lint | ||
9 | |||
10 | |||
11 | bin | ||
12 | --- | ||
13 | |||
14 | This is the main point of interaction between `statix` and | ||
15 | the end user. It's output is human-readable and should also | ||
16 | support JSON/errorfmt outputs for external tools to use. | ||
17 | |||
18 | |||
19 | lib | ||
20 | --- | ||
21 | |||
22 | A library of AST-based lints and utilities to help write | ||
23 | those lints. It should be easy for newcomers to write lints | ||
24 | without being familiar with the rest of the codebase. | ||
25 | |||
26 | |||
27 | vfs | ||
28 | --- | ||
29 | |||
30 | VFS is an in-memory filesystem. It provides cheap-to-copy | ||
31 | handles (`FileId`s) to access paths and file contents. | ||
32 | |||
33 | |||
34 | macros | ||
35 | ------ | ||
36 | |||
37 | This crate intends to be a helper layer to declare lints and | ||
38 | their metadata. | ||
diff --git a/docs/notes.txt b/docs/notes.txt new file mode 100644 index 0000000..bba644c --- /dev/null +++ b/docs/notes.txt | |||
@@ -0,0 +1,55 @@ | |||
1 | VFS | ||
2 | --- | ||
3 | - do all the IO in one place | ||
4 | - pass file handles around | ||
5 | |||
6 | Interface | ||
7 | --------- | ||
8 | - load files to be read as VFS | ||
9 | - path interner | ||
10 | - traits to go from Report to text/errfmt | ||
11 | - offline documentation/explaination for lints | ||
12 | |||
13 | Fix | ||
14 | --- | ||
15 | - multipass runner with hare & tortoise for cycle detection | ||
16 | - fix all possible suggestions | ||
17 | - work with a config generated by CLI | ||
18 | - read data from VFS | ||
19 | - produce a Report | ||
20 | |||
21 | Analysis | ||
22 | -------- | ||
23 | - work with a config generated by CLI | ||
24 | - read data from VFS | ||
25 | - produce a Report | ||
26 | |||
27 | Tests | ||
28 | ----- | ||
29 | - figure out a way to generate stable singleline output for | ||
30 | analysis tests | ||
31 | - use stderr tests for fixes | ||
32 | |||
33 | Lint ideas | ||
34 | ---------- | ||
35 | - unused let bindings | ||
36 | - unused rec | ||
37 | - invalid or potentially risky string interpolations | ||
38 | - useless parens in infix exprs | ||
39 | - unused function params | ||
40 | - manual map over list | ||
41 | - merge inherit | ||
42 | - merge inherit-from | ||
43 | - empty inherit | ||
44 | - useless antiquote/splice (where is antiquote truly | ||
45 | required?) | ||
46 | - useless variadic (things like `{...} : expr`, replace with | ||
47 | `_: expr`) | ||
48 | - redundant pattern `{...} @ inputs : expr`, replace with | ||
49 | `inputs: expr` | ||
50 | - useless hasAttr: `if x ? a then x.a else default` can be | ||
51 | replaced with `x.a or default` | ||
52 | |||
53 | Extensions | ||
54 | ---------- | ||
55 | - vim plugin to populate location list with errors | ||
diff --git a/docs/release.txt b/docs/release.txt new file mode 100644 index 0000000..8cc56ef --- /dev/null +++ b/docs/release.txt | |||
@@ -0,0 +1,7 @@ | |||
1 | Release checklist: | ||
2 | |||
3 | - bump version in Cargo.toml | ||
4 | - run `cargo build --release` to bump Cargo.lock | ||
5 | - run nix-build and update cachix cache | ||
6 | - tag commit with latest version | ||
7 | - push tag and commit to all remotes | ||