A static analysis library for Clojure that catches clojure.spec conform errors at compile time.
Spectrum is a static analysis library for Clojure that uses clojure.spec annotations to catch type-like errors at compile time. It acts as an optional, pragmatic type system, analyzing code to detect spec conform issues before runtime, helping developers identify bugs early in the development process.
Clojure developers who use clojure.spec and want additional compile-time error checking without switching to a full static type system like core.typed.
Developers choose Spectrum for its pragmatic approach that leverages existing spec annotations, offers incremental checking, and focuses on catching common bugs with low false positives, complementing runtime spec instrumentation and generative testing.
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.
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.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Leverages existing clojure.spec annotations, allowing developers to reuse spec work for static analysis without adopting a new type system.
Prioritizes low false positives and usability, aiming to catch 80% of common bugs as stated in the philosophy, making it practical for daily use.
Supports checking individual vars or forms with functions like infer-var, enabling flexible integration into development workflows without full codebase analysis.
Allows tuning of analysis strictness levels to balance thoroughness and performance, as highlighted in the project goals.
Explicitly marked as 'Developer Preview' and not ready for any kind of use, indicating instability and incomplete features.
Effectiveness is limited by the extent of spec annotations in the codebase, which can be a barrier if spec adoption is low.
Admits to potentially missing some type errors in favor of speed and low false positives, which may not satisfy teams needing full assurance.