Skip to content

Commit d9eda95

Browse files
committed
internal lint: update clj-kondo
Turning on the new experimental :rendundant-fn-wrapper linter uncovered a few "oh ok, good!" and a few "interesting!" cases. Addressed findings.
1 parent 2505889 commit d9eda95

File tree

7 files changed

+8
-7
lines changed

7 files changed

+8
-7
lines changed

.clj-kondo/config.edn

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
rewrite-clj.zip.subedit/edit->> clojure.core/->>
1313
rewrite-clj.custom-zipper.switchable/defn-switchable clojure.core/defn}
1414
:linters
15-
{:unsorted-required-namespaces {:level :warning}
15+
{:redundant-fn-wrapper {:level :warning} ;; experimental linter, let's give it a go
16+
:unsorted-required-namespaces {:level :warning}
1617
:unresolved-var {:exclude [io.aviso.ansi]}
1718
:unused-namespace
1819
{:exclude [clojure.test.check]}

deps.edn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
;;
2323
:lint-cache {:replace-paths ["src"]} ;; when building classpath we want to exclude resources
2424
;; so we do not pick up our own clj-kondo config exports
25-
:clj-kondo {:extra-deps {clj-kondo/clj-kondo {:mvn/version "2022.01.15"}}
25+
:clj-kondo {:extra-deps {clj-kondo/clj-kondo {:mvn/version "2022.02.09"}}
2626
:override-deps {org.clojure/clojure {:mvn/version "1.10.3"}}
2727
:main-opts ["-m" "clj-kondo.main"]}
2828

script/clj_graal/gen_test_runner.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
(defn- cmd-find-all-vars[_opts]
7676
(->> (nses)
7777
vars
78-
(map #(symbol %))
78+
(map symbol)
7979
sort
8080
(string/join " ")
8181
println))

script/cljdoc_preview.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
;;
2525

2626
(defn check-prerequisites []
27-
(let [missing-cmds (doall (remove #(fs/on-path %) ["git" "docker"]))]
27+
(let [missing-cmds (doall (remove fs/on-path ["git" "docker"]))]
2828
(when (seq missing-cmds)
2929
(status/die 1 (string/join "\n" ["Required commands not found:"
3030
(string/join "\n" missing-cmds)])))))

script/code_info/ns_lister.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
(defn- cmd-find-all-vars[{:keys [lang] :as _opts}]
2929
(->> (nses lang)
3030
vars
31-
(map #(symbol %))
31+
(map symbol)
3232
sort
3333
(string/join " ")
3434
println))

script/helper/env.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
(defn get-os []
99
(let [os-name (string/lower-case (System/getProperty "os.name"))]
10-
(condp #(re-find %1 %2) os-name
10+
(condp re-find os-name
1111
#"win" :win
1212
#"mac" :mac
1313
#"(nix|nux|aix)" :unix

test/rewrite_clj/zip/editz_test.cljc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
z/of-string
2828
z/down
2929
z/right
30-
(z/edit #(+ %1 %2 %3 %4) 33 23 44)
30+
(z/edit + 33 23 44)
3131
z/root-string))))
3232

3333
(deftest t-edit-uses-default-auto-resolver

0 commit comments

Comments
 (0)