Skip to content

Releases: NoahTheDuke/splint

v1.5.0

12 May 14:53

Choose a tag to compare

[v1.5.0]

New Rules

  • metrics/fn-length: Function bodies shouldn't be longer than 10 lines. Has :body and :defn styles, and :length configurable value to set maximum length.

Added

  • Add test-helpers/expect-match to assert on submatches, transition all existing check-X functions 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 defn forms in postprocessing and attach as metadata instead of parsing in individual rules.

Fixed

  • Fix style/multiple-arity-order with :arglists metadata.
  • Fix binding pattern when binding is falsey.
  • Skip #(.someMethod %) in lint/fn-wrapper.
  • Skip and and or in style/prefer-condp.

v1.4.1

12 May 14:52

Choose a tag to compare

[v1.4.1]

Fixed

  • Fix io/resource issue.
  • Remove .class files from jar.

v1.4.0

08 May 15:25

Choose a tag to compare

[v1.4.0]

Added

  • -v and --version cli flags to print the current version.
  • --config TYPE cli flag to print the diff, local, or full configuration.

Fixed

  • Fix "Don't know how to create ISeq from: clojure.lang.Symbol" error in splint.rules.helpers.parse-defn when 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]) in style/useless-do, add docstring note about it.

v1.3.2

28 Apr 14:30

Choose a tag to compare

Fix babashka

v1.3.1

28 Apr 00:58

Choose a tag to compare

  • Fix doc links.

v1.3.0

28 Apr 00:50

Choose a tag to compare

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

24 Apr 15:08

Choose a tag to compare

[1.2.4]

Fixed

  • Parsing bug in lint/fn-wrapper introduced in v1.2.3.

v1.2.3

24 Apr 14:47

Choose a tag to compare

[1.2.3]

Added

  • `warn-on-reflection to all rules and rule template.
  • Use :spat/import-ns metadata as way to track when a symbol has been imported.

Changed

  • Various performance enhancements:
    • Use protocols in noahtheduke.spat.pattern/simple-type for performance.
    • Use volatile instead of atom for bindings in noahtheduke.spat.pattern.
    • Switch keep to reduce to avoid seq and laziness manipulation.
    • Use some-> where appropriate for short-circuiting.

Fixed

  • #2 by using :spat/import-ns and a list of the built-in imports.

v1.2.2

13 Apr 15:27

Choose a tag to compare

Fixed

  • Differentiate between &&. rest args and parsed lists in :on-match handlers by attaching :noahtheduke.spat.pattern/rest metadata to bound rest args.
  • Bump edamame to 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

07 Apr 14:53

Choose a tag to compare

Added

  • lint/thread-macro-one-arg supports :inline and :avoid-collections styles.
  • :updated field in configuration edn, show in rule docs.
  • :guide-ref for style/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 deploy justfile recipe.