Me written this time, sorry for last time (also my assertion that :enabled got ignored was wrong. I didn't realize that lint/if-else-nil and lint/if-nil-else both exist and are different):
Splints --autocorrect finds and fixes issues in .cljc files that aren't issues in normal mode (and shouldn't be).
Repro src/example.cljc:
(ns example.app)
(defn pick [d]
(if (zero? d)
#?(:clj :clj-branch :default :default-branch)
d))
normal run:
bb -Sdeps '{:deps {io.github.noahtheduke/splint {:mvn/version "1.24.0"}}}' \
-m noahtheduke.splint src/
Linting took 4ms, checked 1 files, 0 style warnings
--autocorrect run:
bb -Sdeps '{:deps {io.github.noahtheduke/splint {:mvn/version "1.24.0"}}}' \
-m noahtheduke.splint --autocorrect src/
Replacing
(if (zero? d) nil d)
with
(when-not (zero? d) d)
in src/example.cljc:4
Me written this time, sorry for last time (also my assertion that :enabled got ignored was wrong. I didn't realize that lint/if-else-nil and lint/if-nil-else both exist and are different):
Splints
--autocorrectfinds and fixes issues in .cljc files that aren't issues in normal mode (and shouldn't be).Repro src/example.cljc:
normal run:
bb -Sdeps '{:deps {io.github.noahtheduke/splint {:mvn/version "1.24.0"}}}' \ -m noahtheduke.splint src/ Linting took 4ms, checked 1 files, 0 style warnings--autocorrect run: