Releases: NoahTheDuke/splint
Releases · NoahTheDuke/splint
v1.5.0
[v1.5.0]
New Rules
metrics/fn-length: Function bodies shouldn't be longer than 10 lines. Has:bodyand:defnstyles, and:lengthconfigurable value to set maximum length.
Added
- Add
test-helpers/expect-matchto assert on submatches, transition all existingcheck-Xfunctions to use it instead. - Track end position of diagnostics.
- Attach location metadata to function "arities" when a defn arg+body isn't wrapped in a list.
Changed
- Parse
defnforms in postprocessing and attach as metadata instead of parsing in individual rules.
Fixed
- Fix
style/multiple-arity-orderwith:arglistsmetadata. - Fix binding pattern when binding is falsey.
- Skip
#(.someMethod %)inlint/fn-wrapper. - Skip
andandorinstyle/prefer-condp.
v1.4.1
[v1.4.1]
Fixed
- Fix
io/resourceissue. - Remove
.classfiles fromjar.
v1.4.0
[v1.4.0]
Added
-vand--versioncli flags to print the current version.--config TYPEcli flag to print thediff,local, orfullconfiguration.
Fixed
- Fix "Don't know how to create ISeq from: clojure.lang.Symbol" error in
splint.rules.helpers.parse-defnwhen trying to parse ill-formed function definitions. - "Fix" error messages. Honestly, I'm not great at these so I'm not entirely sure how to best display this stuff.
- Skip
#(do [%1 %2])instyle/useless-do, add docstring note about it.
v1.3.2
Fix babashka
v1.3.1
- Fix doc links.
v1.3.0
New Rules
naming/single-segment-namespace: Prefer(ns foo.bar)to(ns foo).lint/prefer-require-over-use: Prefer(:require [clojure.string ...])to(:use clojure.string). Accepts different styles in the replacement form::as,:refer [...]and:refer :all.naming/conventional-aliases: Prefer idiomatic aliases for core libraries ([clojure.string :as str]to[clojure.string :as string]).naming/lisp-case: Prefer kebab-case over other cases for top-level definitions. Relies on camel-snake-kebab.style/multiple-arity-order: Function definitions should have multiple arities sorted fewest arguments to most:(defn foo ([a] 1) ([a b] 2) ([a b & more] 3))
v1.2.4
[1.2.4]
Fixed
- Parsing bug in
lint/fn-wrapperintroduced in v1.2.3.
v1.2.3
[1.2.3]
Added
- `warn-on-reflection to all rules and rule template.
- Use
:spat/import-nsmetadata as way to track when a symbol has been imported.
Changed
- Various performance enhancements:
- Use protocols in
noahtheduke.spat.pattern/simple-typefor performance. - Use
volatileinstead ofatomfor bindings innoahtheduke.spat.pattern. - Switch
keeptoreduceto avoid seq and laziness manipulation. - Use
some->where appropriate for short-circuiting.
- Use protocols in
Fixed
- #2 by using
:spat/import-nsand a list of the built-in imports.
v1.2.2
Fixed
- Differentiate between
&&.rest args and parsed lists in:on-matchhandlers by attaching:noahtheduke.spat.pattern/restmetadata to bound rest args. - Bump
edamameto v1.3.21 to handle#:: {:a 1}auto-resolved namespaced maps with spaces between the colons and the map literal. - Use correct url in install docs. (Thanks @dpassen)
v1.2.1
Added
lint/thread-macro-one-argsupports:inlineand:avoid-collectionsstyles.:updatedfield in configuration edn, show in rule docs.:guide-refforstyle/prefer-clj-math.- Interpose
<hr>between each rule's docs.
Changed
- Clarify docstring for
lint/dorun-map.
Fixed
- Left align contents of tables in rule docs.
- Correctly render bare links in rule docs.
- Correctly export clojars info in
deployjustfile recipe.