Skip to content

Releases: clj-kondo/clj-kondo

v2019.08.21-alpha

21 Aug 15:51
Compare
Choose a tag to compare
v2019.08.21-alpha Pre-release
Pre-release

People who contributed to this release:

Issues reported/fixed at Heart of Clojure: #384, #389, #393.

New

potemkin

  • #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! and clojure.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.

  • #414: there is a new NixOS package. See the install docs.

Fixes

  • #394: directories that ended with .clj were incorrectly recognized as a source file.

  • #413: fix false positive when using clojure.test/are within deftest

  • #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

31 Jul 19:05
Compare
Choose a tag to compare
v2019.07.31-alpha Pre-release
Pre-release

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:

circular-dependencies

  • #370: when warning about :use or :refer :all show which vars were referred:

Screenshot 2019-07-31 20 56 10

  • #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

24 Jul 19:06
Compare
Choose a tag to compare
v2019.07.24-alpha Pre-release
Pre-release

New

  • #20, #364 detect unused :refer vars

unused-referred-var

  • #354 don't emit warning when deprecated function calls itself

  • #355 upgrade to GraalVM 19.1.1

  • #357 fix documentation on cljdoc

  • #169 warn about duplicate required namespaces

duplicate-require

  • #342 better resolving of vars when using :refer :all

refer-all-resolve

  • #342 warn about using :refer :all 😜

  • #366 don't warn about type hint symbols that cannot be resolved, CLJS doesn't care about these

v2019.07.17-alpha

17 Jul 19:21
Compare
Choose a tag to compare
v2019.07.17-alpha Pre-release
Pre-release

New

  • #3: suggest seq instead of (not (empty? []))

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.

deprecated-core-var

deprecated-var

Screenshot 2019-07-17 21 56 16

Screenshot 2019-07-17 21 16 50

  • #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

05 Jul 08:30
Compare
Choose a tag to compare
v2019.07.05-alpha Pre-release
Pre-release

New features

  • #243: warn about misplaced docstrings

misplaced-docstring

  • #300: discard whitespace, unevals (#_foo) and comments (;; ...) during parse time. Previous versions of clj-kondo spent around 50% of total time in parsing. With this tweak, that was reduced to 40%.

  • #320: upgrade to GraalVM 19.1.0

Fixes

v2019.06.29-alpha

29 Jun 16:11
Compare
Choose a tag to compare
v2019.06.29-alpha Pre-release
Pre-release

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:

Screenshot 2019-06-29 18 08 11

  • #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

23 Jun 20:48
Compare
Choose a tag to compare
v2019.06.23-alpha Pre-release
Pre-release

New features

  • #271: clj-kondo is now able to lint .edn files.

edn

  • #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

spec-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

16 Jun 15:58
Compare
Choose a tag to compare
v2019.06.16-alpha Pre-release
Pre-release

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):

Screenshot 2019-06-16 17 27 07

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 as required 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

The following issues were fixed: #246, #249, #251, #254

v2019.06.07-alpha

07 Jun 08:39
Compare
Choose a tag to compare
v2019.06.07-alpha Pre-release
Pre-release

New:

  • Clojure API (#226). Calling clj-kondo from other Clojure programs or from the REPL is now a lot easier.
    See API docs and examples.

Screenshot 2019-06-07 10 36 21

json-output

Fixed:

  • False positive unused require (#235)

Enhanced:

  • refactor inline def for performance (#228)

v2019.06.01-alpha

01 Jun 09:44
Compare
Choose a tag to compare
v2019.06.01-alpha Pre-release
Pre-release

New:

  • Detect unused bindings (function arguments, let bindings) (#173). Bindings starting with an underscore will be ignored (e.g. _foo).

unused-binding

  • Lint unbound defaults in destructuring forms (#220, #223).

unbound-destructured

  • Lint for and doseq expressions. These were previously ignored (#188).

  • Support :default shadow-cljs syntax in :require (see shadow-cljs docs) (#222)

shadow-cljs-default-require

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.