Releases: clj-kondo/clj-kondo
v2019.08.21-alpha
People who contributed to this release:
- code: @volrath, @mk, @sogaiu, @lispyclouds and @jlesquembre
- issues: @mynomoto, @SevereOverfl0w, @gordonsyme and @lread.
Issues reported/fixed at Heart of Clojure: #384, #389, #393.
New
-
#388: add support for
schema.core/defschema
via built-in config -
#402: add support for
schema.core/defmethod
-
#390: add
:lang
keys to analysis output for .cljc files so you can see in which context expressions were evaluated -
#393, #422: add support for
clojure.core.async/alt!
andclojure.core.async/alt!!
syntax -
#389: add support for
when-first
-
#406: automatically enable cache when
.clj-kondo
directory is detected, unless--cache false
is used. This will help people who are using editor tooling that did not explicitly set the--cache
option. -
#414: the standalone jar (a.k.a. uberjar) will be uploaded to Github releases.
Fixes
-
#394: directories that ended with
.clj
were incorrectly recognized as a source file. -
#413: fix false positive when using
clojure.test/are
withindeftest
-
#410: fix publishing Docker images to Dockerhub
Deprecations
- #424: the package on Snap is discontinued because too many people were confused by the limitations that Snap brings: you cannot read/write files outside of your home directory and sometimes not even inside your home directory.
v2019.07.31-alpha
New
- #373: output analysis data
Clj-kondo is now able to output analysis data which allows building custom linters and tools.
A description of this data and various examples of what can be done with it is documented here. One example of this is detecting circular dependencies between namespaces:
- #370: when warning about
:use
or:refer :all
show which vars were referred:
-
#382: support ignoring unused key-destructured bindings in function arguments. See docs.
-
#383: configuration option for outputting canonical paths. See docs.
Fixed
- #374: unresolved symbol was not reported when it had the same name of a namespace alias
v2019.07.24-alpha
v2019.07.17-alpha
New
- #3: suggest
seq
instead of(not (empty? []))
- #338: warn on deprecated var usage. Special thanks to @lread for creating this issue and cooperating during the implementation of the linter and corresponding config.
-
better support for top-level
require
:
- #329: allow macros to be linted as
clojure.test/deftest
:
(ns foo)
(defmacro deftest [name & body]
`(defn ~name [] ~@body))
(deftest foo) ;; <- no unresolved symbol foo
Fixes
The following issues were fixed: #331, #333, #334, #335, #344, #346, #348
v2019.07.05-alpha
v2019.06.29-alpha
News
Arch Linux lovers can now install clj-kondo using their favorite package managers. See the docs. Thanks @dharrigan.
Enhancements
- #248: when calling a function with the incorrect amount of arguments, clj-kondo will also report the expected amount of arguments:
- #305: the JVM version of clj-kondo is now able to run with Clojure 1.9.0. This is the minimal Clojure version that clj-kondo needs.
- #301: some keywords are allowed in CLJS that aren't in Clojure. Parsing of keywords was made less strict.
- #294: clj-kondo can now parse code that contains hashbangs. This is useful for scripts.
- #295: the dependency on rewrite-clj, which clj-kondo uses for parsing code, is now inlined together with tools.reader. This means more freedom to make clj-kondo specific changes (like the one in #94 and #301). An additional benefit is that projects using clj-kondo as a dependency in their projects won't have conflicts with other versions of rewrite-clj and tools.reader.
Fixes:
- #307: quotes and backslashes weren't properly escaped in the JSON output
v2019.06.23-alpha
New features
- #271: clj-kondo is now able to lint
.edn
files.
-
#275: a section about integrating clj-kondo with Spacemacs has been added to the docs. Thanks @lispyclouds!
-
#272 : syntax checking for
clojure.spec.alpha/fdef
- #274: Windows binaries are now built using AppVeyor. Thanks again @lispyclouds!
At the same time, it is unclear what is needed to run the Windows binary on other Windows systems. Until we find that out, Windows is considered experimental, or as GraalVM likes to call it: early adopter. See: #276.
- #279: upgrade to GraalVM 19.0.2
Fixes
v2019.06.16-alpha
News
VSCode integration
@marcomorain wrote a VSCode extension called clojure lint which uses clj-kondo for linting. You can download it from the marketplace here. Thanks Marc!
Playground
A playground is available here where you can try out clj-kondo in the browser.
New features
- detection of unresolved symbols (#174):
As this linter may generate a lot of new warnings in some projects, this linter reports at the :info
level for now, so findings will not affect the exit code or error count, for people using clj-kondo in CI. To change the level, apply this config: {:linters {:unresolved-symbol {:level :error}}}
. The default error level may be bumped in future versions.
Configuration to prevent false positives in macros is documented here.
Thanks @mynomoto for thoroughly testing this feature.
Enhancements
- #257: libspecs without
:as
or:refer
in:require
are not reported asrequired but unused
anymore, even if they are not used in the code, since in most cases these are present to ensure that specs, multimethods or foreign libs (CLJS) are loaded. Example:
(ns foo (:require [foo.specs]))
To opt out of this new behavior apply this config: {:linters {:unused-namespace {:simple-libspec true}}}
.
Fixes
v2019.06.07-alpha
v2019.06.01-alpha
New:
- Detect unused bindings (function arguments, let bindings) (#173). Bindings starting with an underscore will be ignored (e.g.
_foo
).
-
Lint
for
anddoseq
expressions. These were previously ignored (#188). -
Support
:default
shadow-cljs syntax in:require
(see shadow-cljs docs) (#222)
Fixed:
-
Treat
(quote foo)
expressions the same way as'foo
expressions (#218). -
False positive redundant do in anonymous function literal (#211)
Special thanks to @mynomoto, @pgj and @svdo for testing and reporting issues.