Skip to content

v1.17.0

Choose a tag to compare

@NoahTheDuke NoahTheDuke released this 08 Sep 20:05
· 93 commits to main since this release

Big feature: Safety and Autocorrection

Every rule has been marked as safe or unsafe. Safe rules don't generate false positives and any suggested alternatives can be used directly. Unsafe rules may generate false positives or their suggested alternatives may contain errors.

Rules that are safe may also perform autocorrection, which is tracked in defrule with :autocorrect. Rules may only perform autocorrection if they're safe.

The Rules Overview has been expanded as well.

Changed

  • Update dependencies. edamame 1.4.27 supports the Clojure 1.12 array syntax: Integer/1.
  • Rules documentation can now handle 3 different directives: @note, @safety, and @examples. All existing # Examples have been converted to @examples, and the relevant rule docstrings have been updated.
  • Rules documentation generation has been changed to handle the above.
  • Added :autocorrect to defrule, :safe to config schema.

Fixed

  • lint/redundant-str-call ignores when used in threading macros. (See #20.)
  • lint/redundant-call ignores when used in threading macros. (See #21.)
  • Fix matching nil when input is too short in patterns, which fixes subtle issues with lint/cond-else.
  • Make support-clojure-version? only compare minor versions if major version numbers match, and likewise with incremental/minor version numbers.