A static code analyzer for Clojure that suggests more idiomatic functions and macros using pattern matching.
Kibit is a static code analyzer for Clojure that identifies code patterns and suggests more idiomatic functions or macros. It helps developers write cleaner, more conventional Clojure by automatically recommending simplifications, such as replacing `(if test action nil)` with `(when test action)`.
Clojure and ClojureScript developers looking to improve code quality and adhere to idiomatic patterns, particularly those working on projects where consistent coding standards are important.
Kibit provides automated, pattern-based suggestions for idiomatic Clojure code, reducing manual code review effort and helping teams maintain consistent coding practices. Its integration with build tools and editors makes it easy to incorporate into existing workflows.
There's a function for that!
Uses core.logic to match code patterns and suggest idiomatic Clojure functions or macros, such as replacing (if test action nil) with (when test action), promoting cleaner code.
Includes --replace and --interactive command-line options to automatically apply suggestions, making code cleanup straightforward without manual editing.
Exits with a non-zero code when suggestions are found, enabling easy integration into build pipelines for automated quality checks, as highlighted in the exit codes section.
Offers plugins for Emacs (kibit-helper) and Vim (kibit-vim, vim-kibit) for real-time analysis within editors, enhancing developer workflow.
Relies on core.logic which is computationally intensive, making analysis slow, especially for larger codebases, as acknowledged in the maintenance status.
The codebase is tightly coupled with core.logic; moving away from it would require a full rewrite, limiting future improvements and extensibility, as noted in the README.
Does not perform macro expansion or resolve symbols beyond clojure.core, leading to incorrect suggestions in cases involving macros or custom functions, per the known limitations.
Static analyzer and linter for Clojure code that sparks joy
Clojure lint tool
Spectrum is a library for performing static analysis on Clojure code, leveraging clojure.spec annotations to detect type-like errors during compilation. It provides an optional, pragmatic layer of compile-time checking on top of spec, aiming to catch common bugs without requiring full spec coverage. ## Key Features - **Static Analysis** — Analyzes Clojure code at compile time to identify potential spec conform errors. - **Spec-Driven** — Uses existing clojure.spec annotations as a foundation for type-like checking. - **Pragmatic Design** — Prioritizes usability and speed over perfect correctness, aiming for low false positives. - **Incremental Checking** — Supports checking individual vars or forms, enabling flexible integration into workflows. - **Configurable Strictness** — Allows tuning of analysis strictness levels to balance thoroughness and performance. ## Philosophy Spectrum embraces a pragmatic approach, valuing a tool that catches 80% of bugs and is used daily over a theoretically perfect but impractical solution. It converges toward correctness while accepting limitations during development.
Clojure test coverage tool
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.