aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAkshay <[email protected]>2022-01-30 07:09:38 +0000
committerAkshay <[email protected]>2022-01-30 07:09:38 +0000
commitade09b4d172ff649b716a05ce597d2da864a3623 (patch)
treef5e032dbf1f5f1780e16c5097d6ba3996deb9a46 /docs
parent7457498ea64c4542b501d4c03ec2ff617763b070 (diff)
rework docs and readme
Diffstat (limited to 'docs')
-rw-r--r--docs/architecture.txt38
-rw-r--r--docs/notes.txt55
-rw-r--r--docs/release.txt7
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 @@
1architecture
2============
3
4statix 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
11bin
12---
13
14This is the main point of interaction between `statix` and
15the end user. It's output is human-readable and should also
16support JSON/errorfmt outputs for external tools to use.
17
18
19lib
20---
21
22A library of AST-based lints and utilities to help write
23those lints. It should be easy for newcomers to write lints
24without being familiar with the rest of the codebase.
25
26
27vfs
28---
29
30VFS is an in-memory filesystem. It provides cheap-to-copy
31handles (`FileId`s) to access paths and file contents.
32
33
34macros
35------
36
37This crate intends to be a helper layer to declare lints and
38their 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 @@
1VFS
2---
3- do all the IO in one place
4- pass file handles around
5
6Interface
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
13Fix
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
21Analysis
22--------
23- work with a config generated by CLI
24- read data from VFS
25- produce a Report
26
27Tests
28-----
29- figure out a way to generate stable singleline output for
30 analysis tests
31- use stderr tests for fixes
32
33Lint 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
53Extensions
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 @@
1Release 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