layout | title |
---|---|
scalastyle |
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.
The latest stable version of Scalastyle is 1.0.0 for Scala 2.10/2.11/2.12. See the Release Notes
There are several ways of using it:
- Maven Plugin
- Eclipse plugin (for 4.2 Juno and 4.3 Kepler and 4.4 Luna)
- SBT plugin
- Command line
- Gradle Plugin
- Intellij - You can enable scalastyle in Intellij by selecting Settings->Editor->Inspections, then searching for Scala style inspections.
- Codacy - You get out-of-the-box analysis on your git repositories.
- Git pre-commit hook
And you'll need a configuration. 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.12 2.11 2.10.
For the maven plugin, see Scalastyle Maven Plugin
For the SBT plugin, see Scalastyle SBT Plugin
Eclipse plugin (for 4.4 Luna and later): Update site http://www.scalastyle.org/downloads/luna-1.0.0/site
The latest development snapshots are available from Sonatype snapshots
For a list of current rules, see Implemented Rules.
For a list of (planned) rules, see the Scalastyle WIKI. If you want to add a rule, then please raise an Issue (or even better a pull request)
For a list of rules in the latest development version, see Development Implemented Rules.
For the version 1.0.0 rules, see 1.0.0 Implemented Rules.
For the version 0.9.0 rules, see 0.9.0 Implemented Rules.
For the version 0.8.0 rules, see 0.8.0 Implemented Rules.
For the version 0.7.0 rules, see 0.7.0 Implemented Rules.
For the version 0.6.0 rules, see 0.6.0 Implemented Rules.
For the version 0.5.0 rules, see 0.5.0 Implemented Rules.
For the version 0.4.0 rules, see 0.4.0 Implemented Rules.
For the version 0.3.0 rules, see 0.3.0 Implemented Rules.
For the version 0.2.0 rules, see 0.2.0 Implemented Rules.
For the version 0.1.0 rules, see 0.1.0 Implemented Rules.
If you wish to contribute to Scalastyle, please see the Scalastyle Developer Guide
If you have any questions or comments, please see Scalastyle users Google groups