Splint 1.70
v1.7.0 adds a new rule, a new cli flag, and two new output options. Details under the fold.
metrics/parameter-count
: Functions shouldn't have more than 4 positional parameters. Has:positional
and:include-rest
styles (only positional or include& args
rest params too?), and:count
configurable value to set maximum number of parameters allowed.
After using --quiet
for a while, I realized that it still prints a lot, so I added -s
/ --silent
to print literally nothing (only returning an exit code). Been helpful when running smoke tests locally, or testing speed of execution.
I added json
and json-pretty
to --output
, which outputs json strings, raw or prettified. The prettified json doesn't look great (it's a clojurist's pprint, not jq
or eslint
lol) but it's better than nothing. Might revisit this at a later date.
Splint now tracks all files that have been parsed and checked in the return map under :checked-files
. No use case yet, but it's helpful to know what's actually been looked at.
Splint now uses farolero to handle splint.runner
errors. I was worried it would slow down the app but so far, I've not run into anything yet.
And here's a short list of bug fixes:
- Only attach parsed
defn
metadata when fn name exactly matchesdefn
ordefn-
and second form is a symbol. --no-parallel
was producing a lazy seq, now consumes to actually check all files. Oops lol.- Map over top-level forms with
nil
parent form instead of treating the whole file as a top-level vector of forms. Fixesnaming/lisp-case
. - Add pre- and post-
attr-maps
todefn
metadata when parsingdefn
forms.