Eastwood – Clojure lint tool

Eastwood is a Clojure linter that examines namespaces and identifies potential programming errors. Its main focus is correctness rather than enforcing coding conventions, making it useful for detecting subtle problems that might otherwise escape notice.

The tool uses tools.analyzer.jvm to analyse Clojure code, including macro expansion and evaluation. This compiler-oriented approach allows Eastwood to understand constructs that simpler pattern-matching linters may struggle with. It also means that loading and analysing namespaces can execute code and produce side effects.

Eastwood is particularly well suited to automated testing and continuous integration, where thorough analysis is often more important than immediate feedback. It works with JVM Clojure rather than ClojureScript, and the source being analysed must be capable of compiling successfully.

Developers can select individual warning categories, exclude particular namespaces and configure which findings should be reported. Eastwood complements tools such as clj-kondo and Splint, which use different approaches to analysing source code.

This is free and open source software.

Key Features

  • Compiler-oriented analysis using tools.analyzer.jvm, including macro expansion.
  • Detects suspicious expressions, constant tests and incorrect function calls.
  • Identifies deprecated functions, Java methods, constructors and fields.
  • Reports unused return values and potentially incorrect test expressions.
  • Checks for namespace declarations that do not match their source filenames.
  • Detects variable redefinitions, incorrect metadata and misplaced docstrings.
  • Checks reflection warnings, boxed arithmetic and selected performance issues.
  • Optional checks for unused function arguments, local bindings, namespaces and private vars.
  • Configurable warning categories, including the ability to enable or disable individual linters.
  • Supports selective warning suppression through configuration files.
  • Analyse selected namespaces, source directories and test code.
  • Can restrict analysis to files modified since the previous run.
  • Supports command-line execution and use from a Clojure REPL.
  • Non-zero exit status for detected problems, suitable for automated build checks.
  • Cross-platform support – runs on Linux, macOS, and Windows.

Website: github.com/jonase/eastwood
Support:
Developer: Jonas Enlund, Nicola Mometto and Andy Fingerhut
License: Eclipse Public License v1.0

Eastwood is written in Clojure. Learn Clojure with our recommended free books and free tutorials.


Related Software

Clojure Linter Tools
kibitStatic code analyzer for Clojure, ClojureScript, cljx and other Clojure variants
JokerSmall Clojure interpreter, linter and formatter
EastwoodInspects namespaces and reports possible problems
clj-kondoStatic analyzer and linter for Clojure
clojure-lspLanguage server providing Clojure and ClojureScript tooling
SplintFocuses on style and code shape
CarveFind and remove unused functions and namespaces in Clojure
clj-dependAnalyse and enforce namespace dependencies in Clojure projects

Read our verdict in the software roundup.


Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted