WartRemover is a flexible code linting tool for Scala.
It approaches linting through small checks known as warts, each targeting a language feature or programming pattern that a project may wish to prohibit. This makes it particularly suitable for teams that want to define a constrained subset of Scala rather than accept every construct permitted by the compiler. The supplied checks range from potentially unsafe behaviour to features that can weaken type safety or make code harder to reason about, while custom warts can extend the system with organisation-specific policies.
This is free and open source software.
Key Features
- Supplies individual warts that can be enabled selectively according to a project’s coding policy.
- Offers collections of checks for applying groups of restrictions without configuring every wart separately.
- Can reject explicit use of
nulland other constructs that undermine Scala’s type-safety guarantees. - Detects unsafe access to partial APIs such as retrieving a value directly from an empty
Option. - Can flag inferred
Nothingtypes where inference may indicate that important type information is missing. - Includes checks for unsafe casts, non-exhaustive programming practices and other potentially surprising language usage.
- Supports exclusions so selected source regions, declarations or generated code do not need to satisfy every rule.
- Allows developers to create custom warts using the Scala compiler tree API.
- Operates as a compiler plugin, placing checks directly in the normal Scala compilation process.
- Can fail compilation when prohibited patterns are encountered, making coding rules enforceable rather than advisory.
- Supports Scala projects built with commonly used Scala build tooling.
- Provides separate rule implementations for language constructs so teams can adopt restrictions incrementally.
Website: github.com/wartremover/wartremover
Support:
Developer: Brian McKenna, Chris Neveu and contributors
License: Apache License 2.0
WartRemover is written in Scala. Learn Scala with our recommended free books and free tutorials.
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. |


Please read our Comment Policy before commenting.