View on GitHub

Scalastyle - Scala style checker

Scalastyle examines your Scala code and indicates potential problems with it. If you have come across Checkstyle for Java, then you’ll have a good idea what scalastyle is. Except that it’s for Scala obviously.

Scalastyle is used as part of the grading framework for the course Functional Programming Principles in Scala by Martin Odersky on Coursera.

How do I use scalastyle?

The latest stable version of Scalastyle is 1.5.1 for Scala 2.11/2.12/2.13. For more details, see the release notes for Scalastyle and sbt-scalastyle.

There are several ways of using it:

And you’ll need a configuration file. If you have your own custom rules, then see custom rules.

For the list of possible rules, see Implemented Rules.


To download Scalastyle, the jar is available from Sonatype: 2.13, 2.12, 2.11.
For the SBT plugin, see Scalastyle SBT Plugin.
The latest development snapshots are available from Sonatype snapshots.


For a list of current rules, see Implemented Rules.

If you want to add a rule, then please raise an Issue (or even better a pull request).

For the version 1.5.0 rules, see 1.5.0 Implemented Rules.
For the version 1.4.0 rules, see 1.4.0 Implemented Rules.
For the version 1.3.0 rules, see 1.3.0 Implemented Rules.
For the version 1.2.0 rules, see 1.2.0 Implemented Rules.
For the version 1.1.1 rules, see 1.1.1 Implemented Rules.
For the version 1.1.0 rules, see 1.1.0 Implemented Rules.
For the version 1.0.0 rules, see 1.0.0 Implemented Rules.
For older versions, see


If you wish to contribute to Scalastyle, please see the Scalastyle Developer Guide.

Questions and comments

If you have any questions or comments, please see Scalastyle users Google group or the Gitter channel.

Github repositories