WartRemover – flexible Scala code linter

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 null and 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 Nothing types 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.


Related Software

Scala Linters
ScalafixRefactoring and static analysis tool for improving code quality
ScapegoatStatic analysis tool that detects bugs and questionable code
WartRemoverFlexible tool for enforcing safer coding practices

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