For a list of breaking changes, check here.
- Fix #1537: stackoverflow with potemkin import vars with cyclic references
- Add linter
:conflicting-fn-arity
: warn when an arity occurs more than once in a function that overloads on arity. #1136 (@mknoszlig) - Add linter
:clj-kondo-config
which provides linting for.clj-kondo/config.edn
. #1527 - Relax
:reduce-without-init
for functions known to be safe #1519 - Symbol arg to
fdef
can be arbitrary namespace #1532 - Improve potemkin generated var-definition analysis #1521 (@ericdallo)
- Stabilize cache version independent from kondo version #1520. This allows you to re-use the cache over multiple kondo versions.
:output {:progress true}
should print to stderr #1523- Only print informative messages when
--debug
is enabled. #1514 - Add Sublime Text instructions #827 (@KyleErhabor)
- Fix end location in anonyous function body #1533
- Bump datalog-parser to 0.1.9: allows symbol constants in datalog expression
- Add linter
:reduce-without-init
: warn against two argument version of reduce. Disabled by default. See docs. #1064 (@mknoszlig) - Add linter
:quoted-case-test-constant
: warn on quoted test constants in case. #1496 (@mknoszlig)
- Fix false positive unused binding in re-frame subscribe #1504
- Fix exclude-defmulti-args for CLJS #1503
- Fix warning location of namespaced map #1475
- False positive :docstring-no-summary on multiline docstrings #1507
- Automatically load configurations from
.clj-kondo/*/*/config.edn
. This can be disabled with:auto-load-configs false
. #1492 - Add linter
:duplicate-case-test-constant
: detect duplicate case test constants. See docs. #587 (@mknoszlig) - Add linter
:unexpected-recur
: warn onrecur
in unexpected (non-tail) position. #1126 - Add linter
:used-underscored-binding
: warn on used bindings that start with underscore. Disabled by default. See docs. #1149 (@mknoszlig) - Add linter
:docstring-blank
for checking empty docstring. See docs. #805 (@joodie) - Add linter
:docstring-leading-trailing-whitespace
for checking leading and trailing whitespace in docstring. Disabled by default. See docs. #805 (@joodie) - Add linter
:docstring-no-summary
for checking the absence of summary of args in docstring. Disabled by default. See docs. #805 (@joodie) - Add
:exclude-defmulti-args
option for:unused-bindings
linter. See docs. #1188 (@mknoszlig) - Support
:config-in-comment
#1473. See docs.
- Bump built-in cache for clojure 1.11.0-alpha3 and
clojure.data.json
- Reword
:refer
suggestion so you can copy paste it #1293 (@vemv) - Add re-frame analysis output #1465 (@benedekfazekas)
- Qualified map causes too many arguments in type checker #1474
- Handle reader conditional with unknown language #970
- Improve linting in
extend-protocol
,extend-type
,reify
,specify!
#1333, #1447 - Support
:context
in nodes in hooks for adding context to analysis #1211 goog.object
,goog.string
etc must be required before use in newer releases of CLJS #1422- Resume linting after invalid keyword #1451
- Fix install script for relative dir opts #1444
- Fix type mismatch error with auto-qualified keyword #1467
- String type hint causes false error report #1455
- Fix false positive with cljs/specify! #1450
- Improve analysis for ns-modifying destructuring key #1441
- CLJS
(exists? foo.bar/az)
complains about require #1472
- New optional linter: warn on missing
gen-class
if namespace has-main
fn #1417. See docs. - Detect arity mismatches for functions defined with
def
#1408 - Type inference improvements for
def
+fn
combination #1410 - Local
fn
type inference #1412 - Analysis: allow user to request all or specific metadata be returned #1280 (@lread)
rseq
called on other type than vector or sorted-map now gives type error #1432
- Fix false positive with ns-unmap #1393
- Support custom-lint-fn with
.cljc
#1403 - Allow reader conditional in metadata #1414
- Analysis: add
:from-var
in higher order call #1404 - Dedupe linted files #1395 (@ericdallo)
- Add
:duplicate-ns
to duplicate-require linter output #1421 (@ericdallo) if-let
/if-some
with invalid arity no longer warn #1426- Analysis: spport for defn 2nd attr-map, :doc derivation fixes (@lread)
- Fix parsing of trailing metdata map #1433 (@lread)
- Update built-in cache to clojure 1.11.0-alpha2 #1382
- Take into account aliases in
import-vars
#1385 - Consider var as used in CLJS
case
to avoid false positives for constants #1388 - Understand
ns-unmap
pattern #1384 - Expose config functions in core API namespace #1389
- Fix false positives when using quoted collection in function position #1390
- Add
:end-row
,:end-col
to:var-usages
analysis element #1387 - BREAKING: Change
:row
and:col
for:var-usages
to use the start location of the call instead of the name location #1387
- Support
:as-alias
(new feature in Clojure 1.11) #1378 - Improve
:loop-without-recuir
wrt/fn
and other constructs that introduce arecur
target #1376
- Add
:loop-without-recur
linter. #426 - Lint
deps.edn
andbb.edn
:paths
#1353 (@lread) - Fix unresolved-symbol for all-lowercase class name #1362
- Add
:refer
to var-usages when inside a require #1364 (@ericdallo) - musl fix #1365 (@thiagokokada)
- Fix incorrectly reported filename #1366
- Self-referring private-var should be reported unused if not used elsewhere #1367
- Support options map in
babashka.process/$
#1368 - Analyze metadata map of
defmulti
#1310 - Add support for potemkin full qualified symbols #1371 (@ericdallo)
- Expose
ns-analysis
fn in hooks API #1349 (@hugoduncan) - Fix for Windows when analyzing deps
- Fix conflicts between application code and hook config code in cache #1340
- Allow overriding level in
reg-finding!
#1344 (@ericdallo) - Fix
declare
name positions in analysis #1343 (@ericdallo) - Updated rules for
deps.edn
to match Clojure CLI1.10.1.933
(@dpassen)
:macroexpand
hook. This allows linting using the same or similar macros from your code. See docs.
- Add types for
ex-info
#1314 - Bump SCI to v0.2.6
- Fix EDN/JSON serialization of findings for NPM string namespace #1319
- Support fully qualified symbol in def referring to current namespace #1326
- Fix false positive redundant expression in pre-post map #1335
- Lint arities of fn arguments to higher order functions (
map
,filter
,reduce
, etc.) #1297 - Add
map-node
andmap-node?
to hooks API #1270
- Disable redefined-var warning in comment #1294
:skip-comments false
doesn't override:skip-comments true
in namespace config #1295- False positive duplicate element set for symbols/classes #1296
- False positive unused namespace with
clojure.spec/keys
#1289
- Lint
clojure.spec.alpha/keys
#1272 (@daveduthie) - Macroexpand
clojure.template/do-template
#603 - Proper macroexpansion for
clojure.test/are
#1284 - Resolve vars in
clojure.data.xml
imported via macro #1274 - Lint
([])
as invalid call to vector #1276
- Improve keyword reg support for re-frame #1159 (@ericdallo)
- Refine messaging around importing configs #1256 (@lread)
- Static linux binary is now compiled with musl
- Recognize
:doc
from attr-map indefn
#1265 - Don't skip linting
.jar
files with--dependencies
when config(s) have changed #1285
--fail-level
flag to specify the minimum severity for a non-zero exit code #1259 (@RickMoynihan)
- Support
core.async
defblockingop
macro #1244 - Add error message when keywords are passed in
:or
map #1242 - False positive unused default when analyzing locals #1246
- False positive when destructuring depends on previous arg #782
- Keyword analysis for namespaced maps #1251 (@ericdallo)
- Report reader errors at the start of token #1255 (@yuhan0)
- Fix recur arity for lazy-seq and lazy-cat (@yuhan0)
- Prioritize aliases over object access in CLJS #1248 (@jahson)
:defined-by
contains raw node for sgen fns #1231- Fix wrong order of unresolved symbols #1237
- Remove generated nodes from analysis #1239 (@ericdallo)
- Add
:report-duplicates
linter config for several linters. #1232 (@snoe)
--copy-configs
flag to indicate copy configs from dependencies while linting. This replaces--no-warnings
.--dependencies
flag to indicate skipping already linted jars for performance. This replaces--no-warnings
.
- Support js property access syntax #1189
- Fix linting
user.clj
#1190 - Add linting for
sgen/lazy-prims
#1192 - NullPointerException when ignoring :deprecated-var #1195
- Fix
:lint-as
withcond->
#1205 - Expose config to hook fns #1208 (@not-in-stock)
- Fix crash with :clj-kondo/ignore in combination with :rename #1210
- Fix false positive unresolved symbol in CLJS type hint #1212
- Fix invalid namespace in clojure.data.xml analysis #1202
- Fix analysis of
clojure.core.reducers/defcurried
#1217 - Add
:defined-by
on missing var definitions #1219 (@ericdallo) - Add name positions to local-usage analysis #1220 (@ericdallo)
- False positive
:unused-private-var
warning for deftype^:private
#1222 - Correct escaping for docstrings in analysis #1224 (@lread)
- Redundant expression false positive #1183
- Redundant expression false positive #1185
- Regression in unresolved symbol config #1187
- Lint nested function literal #636
- Redundant expression linter #298
- Add
:exclude
config to :refer linter #1172 - Warn on non-existent var in
:refer
#546 - Support
clojure.data.xml/alias-uri
#1180
- Fix schema.core/defmethod linting for vectors dispatch-values #1175 (@leoiacovini)
- Continue analyzing on invalid symbol #1146
- Standalone require should be emitted to analysis #1177
- Upgrade sci to 0.2.4
Thanks to @snoe and @ericdallo for contributing to this release. Thanks to the sponsors on Github, OpenCollective and Clojurists Together for making this release possible.
- Core.match support #496
- Keyword analysis #1129 (@snoe). See analysis docs.
- BREAKING: Don't use lint-as for hooks #1170
- Fix crash when linting kitchen-async #1148
- Memory optimizations for clojure-lsp commit
- Upgrade to GraalVM 21.0.0 #1163
- Fix analysis of case dispatch vals #1169
- Potemkin improvement with regards to unresolved var #1167
- Exported config fix for git deps #1171
- Add
:aliases
to ns ctx and:alias
to var-usages #1133 (@snoe) - Add
:end-row
and:end-col
to var-definitions bucket on analysis #1147 (@ericdallo) - Fix unresolved var
clojure.spec.gen.alpha/fmap
#1157
Thanks to @SevereOverfl0w, @jysandy, @tomdl89, @snoe, @audriu, and @ericdallo for contributing to this release.
- New linter:
:unresolved-var
. This detects unresolved vars in other namespaces, likeset/onion
. See docs. #635 - Alpine Docker build #1111
- Add locals to analysis #1109 (@snoe)
- Add analysis for arglists #1123 (@snoe)
- Fix finding without location info #1101
- Detect duplicate key in '{[1 2] 3, (1 2) 4} #1056 (@jysandy)
- Add cljs.core cases in
lint-specific-calls!
#1116 (@tomdl89) - [#1099] Add :single-operand-logical linter for
and
andor
#1122 (@tomdl89) - Add
:ns
to:unused-namespace
findings (@ericdallo) - Derive config dir from only file path linted #1135
- Support name in defmethod fn-tail #1115
- Avoid crash when using
:refer-clojure
+:only
#957
- Documentation: a list of all available linters #936
- Lint protocol and interface implementations in
deftype
anddefrecord
#140 - Upgrade to GraalVM 20.3.0 #1085
- Support
cljs.core/simple-benchmark
syntax #1079 - Support
babashka.process/$
macro syntax #1089
- Fix recur arity in doysync #1081
- Alias linter doesn't recognize (quote alias) form #1074
- Fix retries for
refer :all
when linting in parallel #1068 - Improve analyzing syntax of
amap
#1069 - Namespaced map in
deps.edn
causes false positive #1093 - Support ignore hints in
deps.edn
#1094 - Fix unsorted namespaces linter for nested libspecs #1097
- Fix reported ns name in analysis for nested libspecs #1100
Thanks @bennyandresen, @jaihindhreddy, @mharju, @pepijn, @slipset and @nvuillam for contributing to this release. Thanks to Clojurists Together for sponsoring this release.
- Lint deps.edn #945
--filename
option to set filename when linting from stdin. This should be used for editor plugins to enabledeps.edn
linting.- Export and import config via classpath #559, clj-kondo/config#1
--no-warnings
flag to indicate linting is used to populate cache.- Skip already linted jars #705
- Implement
:include
option for shadowed-var linter #1040 - Return
:files
count in summary #1046
- Better resolving of vars referred with
:all
#1010 - Fix false positive with
format
#1044 - Fix index out of bounds exception clj-kondo.lsp#11
- More robust marking of generated nodes to avoid redundant dos and lets despite location metadata #1059
Thanks @zilti, @dharrigan and @sogaiu for contributing to this release. Thanks to Clojurists Together for sponsoring this release.
- Shadowed var linter #646. See docs.
- Config for ignoring unused
:as
binding clj-kondo#1016 (@dharrigan) - Type warning for
contains?
#1021 - Predicate functions for hooks api #1006. See docs.
- Support reader conditionals in ignore hint #1022. See docs.
- Support ignore hint on unused binding #1017
- Support ignore hint in ns form #1031
- Linux packages (@zilti)
- Fix memory leak in long running process #1036
- Claypoole config enhancements clj-kondo/config#7
- Don't warn about redundant
let
anddo
in hook-generated code #1038 - Fix format string false positive #1007
- Parse failure in
(or)
#1023 - Analyze require in top-level do #1018
- Analyze quote in require #1019
- Base Docker image on Ubuntu latest #1026
Thanks to @cldwalker, @bfontaine, @snoe, @andreyorst, @jeroenvandijk, @jaihindhreddy, @sittim and @sogaiu for contributing to this release. Thanks to the people who helped designing the new features in Github issue conversations. Thanks to Clojurists Together for sponsoring this release.
-
Add
--parallel
option to lint sources in parallel. This will speed up linting an entire classpath. #632, #972 -
Detect error when calling a local that's not a function. #948
(let [inc "foo"] (inc 1)) ^--- String cannot be called as a function
-
Support ignore hints #872:
(inc 1 2 3) ^--- clojure.core/inc is called with 3 args but expects 1 #_:clj-kondo/ignore (inc 1 2 3) ^--- arity warning ignored #_{:clj-kondo/ignore[:invalid-arity]} (do (inc 1 2 3)) ^--- only redundant do is reported, but invalid arity is ignored
Also see config.md.
-
Merge config from
$HOME/.config/clj-kondo
, respectingXDG_CONFIG_HOME
. See config.md for details. #992 -
New
:config-paths
option in<project>/.clj-kondo/config.edn
. This allows extra configuration directories to be merged in. See config.md for details. #992 -
Config tool that can spit out library specific configurations that can be added via
:config-paths
. Contributions for libraries are welcome. -
Experimental spec inspection tool that attempts to extract type information for linting. Also uses the new
:config-paths
feature. -
Allow pinned version in installation script #946 (@cldwalker)
- Fix docstring in Rum
defc
hook #960 - Format string checking improvements #942, #949
- False positive with
into
andtransducer
#952 - Alias usage not detected in keywords when in quoted form #981
- Fully qualified class name incorrectly assumed to be var #950
- Backup existing clj-kondo binary when installing #963 (@bfontaine)
- Various documentation fixes and improvements (@jeroenvandijk, @sittim, @sogaiu)
- Update to GraalVM 20.2.0 for
native-image
build @jaihindhreddy
Details about releases prior to v2020.09.09 can be found here.
- Change
:row
and:col
for:var-usages
to use the start location of the call instead of the name location #1387