Add large vars linter to dev practices

pull/4126/head
Gabriel Horner 2022-02-07 10:18:43 -05:00
parent e81678fc69
commit a3ff4442e8
1 changed files with 13 additions and 1 deletions

View File

@ -4,6 +4,9 @@ This page describes development practices for this codebase.
## Linting
Most of our linters require babashka. Before running them, please install
https://github.com/babashka/babashka#installation.
### Clojure code
To lint:
@ -21,7 +24,6 @@ There are outstanding linting items that are currently ignored to allow linting
### Unused vars
We use https://github.com/borkdude/carve to detect unused vars in our codebase.
Before running it, please install https://github.com/babashka/babashka.
To run this linter:
```
@ -39,6 +41,16 @@ scripts/carve.clj '{:interactive true}'
When a var is ignored, it is added to `.carve/ignore`. Please add a comment for
why a var is ignored to help others understand why it's unused.
### Large vars
Large vars have a lot of complexity and make it hard for the team to maintain
and understand them. To run this linter:
```
scripts/large_vars.clj
```
To configure the linter, see its `config` var.
## Testing
We have unit and end to end tests as described in https://github.com/logseq/logseq#5-run-tests.