File tree Expand file tree Collapse file tree 4 files changed +21
-11
lines changed
imports/hiccup/hiccup/hiccup Expand file tree Collapse file tree 4 files changed +21
-11
lines changed Original file line number Diff line number Diff line change 6060 ; ; suffice
6161 :redundant-fn-wrapper {:level :warning }
6262
63+ ; ; Warn on format strings w/o format directives
64+ :redundant-format {:level :warning }
65+
6366 ; ; warn when binding symbols to themselves
6467 :redundant-let-binding {:level :warning }
68+
69+ ; ; Warn when we cast/coerce a value that is already of the intended type
70+ :redundant-primitive-coercion {:level :warning }
6571
6672 ; ; warn when calling str with a single arg
6773 :redundant-str-call {:level :warning }
7884
7985 :unused-alias {:level :warning }
8086
87+ ; ; Warn when we exclude a var from clojure that we don't actually use in the ns
88+ :unused-excluded-var {:level :warning }
89+
8190 :used-underscored-binding {:level :warning }}}
8291
Original file line number Diff line number Diff line change 11(ns hiccup.hooks
2- (:require [clj-kondo.hooks-api :as api]
3- [clojure.set :as set]))
2+ (:require
3+ [clj-kondo.hooks-api :as api]
4+ [clojure.set :as set]))
45
56; ; See https://github.com/clj-kondo/clj-kondo/blob/master/doc/hooks.md
67
1617(defn- count-args [arity]
1718 (let [args (first (api/sexpr arity))]
1819 (if (= '& (fnext (reverse args)))
19- true ; unbounded args
20+ true ; ; unbounded args
2021 (count args))))
2122
2223(defn- dummy-arity [arg-count]
Original file line number Diff line number Diff line change 33
44set -euo pipefail
55
6- CLJ_KONDO_VERSION=" 2025.12.23 "
6+ CLJ_KONDO_VERSION=" 2026.01.12 "
77ROOT=$( cd " $( dirname " ${BASH_SOURCE[0]} " ) /../" && pwd)
88
99function ensure_clj_kondo() {
Original file line number Diff line number Diff line change 5050 (is (= 5 (stats/download-count stats " c" " z" )))))
5151
5252(deftest format-stats-with-commas
53- (is " 0" (stats/format-stats 0 ))
54- (is " 1" (stats/format-stats 1 ))
55- (is " -1" (stats/format-stats -1 ))
56- (is " 1" (stats/format-stats 1.25129 ))
57- (is " 999" (stats/format-stats 999 ))
58- (is " 1,000" (stats/format-stats 1000 ))
59- (is " 2,123,512" (stats/format-stats 2123512 )))
53+ (is ( = " 0" (stats/format-stats 0 ) ))
54+ (is ( = " 1" (stats/format-stats 1 ) ))
55+ (is ( = " -1" (stats/format-stats -1 ) ))
56+ (is ( = " 1" (stats/format-stats 1.25129 ) ))
57+ (is ( = " 999" (stats/format-stats 999 ) ))
58+ (is ( = " 1,000" (stats/format-stats 1000 ) ))
59+ (is ( = " 2,123,512" (stats/format-stats 2123512 ) )))
You can’t perform that action at this time.
0 commit comments