diff options
-rw-r--r-- | docs/architecture.txt | 38 | ||||
-rw-r--r-- | docs/notes.txt (renamed from notes.txt) | 0 | ||||
-rw-r--r-- | docs/release.txt (renamed from release.txt) | 0 | ||||
-rw-r--r-- | readme.md | 44 |
4 files changed, 48 insertions, 34 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/notes.txt b/docs/notes.txt index bba644c..bba644c 100644 --- a/notes.txt +++ b/docs/notes.txt | |||
diff --git a/release.txt b/docs/release.txt index 8cc56ef..8cc56ef 100644 --- a/release.txt +++ b/docs/release.txt | |||
@@ -48,6 +48,12 @@ nix run git+https://git.peppe.rs/languages/statix -- --help | |||
48 | cachix use statix | 48 | cachix use statix |
49 | ``` | 49 | ``` |
50 | 50 | ||
51 | Install from nixpkgs: | ||
52 | |||
53 | ```shell | ||
54 | nix run nixpkgs#statix -- help | ||
55 | ``` | ||
56 | |||
51 | Install with [brew/linuxbrew](https://brew.sh) | 57 | Install with [brew/linuxbrew](https://brew.sh) |
52 | 58 | ||
53 | ```bash | 59 | ```bash |
@@ -130,45 +136,15 @@ empty_pattern | |||
130 | redundant_pattern_bind | 136 | redundant_pattern_bind |
131 | unquoted_uri | 137 | unquoted_uri |
132 | deprecated_is_null | 138 | deprecated_is_null |
139 | empty_inherit | ||
140 | faster_groupby | ||
141 | faster_zipattrswith | ||
142 | deprecated_to_path | ||
133 | ``` | 143 | ``` |
134 | 144 | ||
135 | All lints are enabled by default. | 145 | All lints are enabled by default. |
136 | 146 | ||
137 | ## Architecture | ||
138 | |||
139 | `statix` has the following components: | ||
140 | |||
141 | - `bin`: the CLI/entrypoint | ||
142 | - `lib`: library of lints and utilities to define these | ||
143 | lints | ||
144 | - `vfs`: virtual filesystem | ||
145 | - `macros`: procedural macros to help define a lint | ||
146 | |||
147 | ### `bin` | ||
148 | |||
149 | This is the main point of interaction between `statix` | ||
150 | and the end user. It's output is human-readable and should | ||
151 | also support JSON/errorfmt outputs for external tools to | ||
152 | use. | ||
153 | |||
154 | ### `lib` | ||
155 | |||
156 | A library of AST-based lints and utilities to help write | ||
157 | those lints. It should be easy for newcomers to write lints | ||
158 | without being familiar with the rest of the codebase. | ||
159 | |||
160 | ### `vfs` | ||
161 | |||
162 | VFS is an in-memory filesystem. It provides cheap-to-copy | ||
163 | handles (`FileId`s) to access paths and file contents. | ||
164 | |||
165 | ### `macros` | ||
166 | |||
167 | This crate intends to be a helper layer to declare lints and | ||
168 | their metadata. | ||
169 | |||
170 | ## TODO | 147 | ## TODO |
171 | 148 | ||
172 | - Test suite for lints and suggestions | ||
173 | - Resolve imports and scopes for better lints | 149 | - Resolve imports and scopes for better lints |
174 | - Add silent flag that exits with status | 150 | - Add silent flag that exits with status |