There's a function for that!
kibit is a static code analyzer for Clojure which uses the
core.logic unifier to
search for patterns of code for which there might exist a more
idiomatic function or macro. For example if kibit finds the code
(if (some test) (some action) nil)
it will make the suggestion to use the
while macro instead of
:dev-dependencies [... [jonase/kibit "0.0.1"] ...]
project.clj file and run
to analyze your namespaces.
It is very easy to write new patterns for
kibit. Take a look at
to see how new patterns are created. If you know of a recurring
pattern of code that can be simplified, please consider sending me a
Bugs can be reported using the github bug tracker.
- Figure out how to report line numbers.
- More rules
- Remove reflection warnings (how?)
- Can core.logic be used to its full potential?
- Analyse ClojureScript files?
Copyright (C) 2012 Jonas Enlund
Distributed under the Eclipse Public License, the same as Clojure.