Clj-kondo performs static analysis on Clojure, ClojureScript and EDN. It informs you about potential errors while you are typing (without executing your program).
This linter is:
- compatible with .clj, .cljs, .cljc and .edn files.
- build tool and editor agnostic.
- a static code analyzer.
- compiled to native code using GraalVM.
This is free and open source software.
Key Features
Detects:
- inline
defexpressions. - redundant
doandletwrappings. - arity errors:
- within the same namespace and across namespaces.
- of static Java method calls.
- of local
letandletfnbinding calls. - of recursive calls (including
recur). - conflicting arities in overloaded functions.
- unused private vars.
- private and deprecated var usage.
- required but unused namespaces.
- unsorted required namespaces.
- referred but unused vars.
- duplicate requires.
- unused function arguments and let bindings.
- marked as unused, but used arguments and let bindings (optional).
- unused imports.
- redefined vars.
- unresolved symbols, vars and namespaces.
- misplaced docstrings.
- duplicate map keys and set elements.
- duplicates and quoting in case test constants.
- missing map keys.
- invalid number of forms in binding vectors.
- missing assertions in
clojure.test/deftest - alias consistency.
- type checking.
- Datalog syntax checking.
- format string argument mismatches.
- shadowed vars.
- 2 argument usage of reduce (optional).
before your form hits the REPL.
It suggests several style guide recommendations, such as:
- rules from Stuart Sierra’s how to ns.
- use
:elseas the catch-all test expression incond. - use
seqinstead of(not (empty? ,,,)). - don’t make your lines too long.
Website: github.com/clj-kondo/clj-kondo
Support:
Developer: Michiel Borkent
License: Eclipse Public License
clj-kondo is written in Clojure. Learn Clojure with our recommended free books and free tutorials.
Related Software
| Clojure Linter Tools | |
|---|---|
| kibit | Static code analyzer for Clojure, ClojureScript, cljx and other Clojure variants |
| Joker | Small Clojure interpreter, linter and formatter |
| eastwood | Inspects namespaces and reports possible problems |
| clj-kondo | Static analyzer and linter for Clojure |
| Splint | Focuses on style and code shape |
| Yagni | Leiningen plugin for finding dead code |
| lein-bikeshed | Leiningen plugin |
Read our verdict in the software roundup.
Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more. Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form. |

