View on GitHub

Scalastyle - Command line

Running scalastyle as an executable

Some tools (like overcommit require a scalastyle executable to be on your PATH

Mac OS X - Homebrew makes it easy to install scalastyle

$ brew install scalastyle

Linux - Save the following script as scalastyle, place it on your PATH, then make it executable via chmod +x path/to/scalastyle. Note that you will need to download the appropriate scalastyle-batch.jar and update its path accordingly

#!/bin/bash
java -jar path/to/scalastyle_2.10-0.8.0-batch.jar "$@"

Running scalastyle from the command line (version 0.6.0 and later)

Download scalastyle-batch 2.10 or scalastyle-batch 2.11.

Run the jar like:

$ java -jar scalastyle-batch_2.10.jar --config lib/scalastyle_config.xml src/main/scala

or similar. You’ll need a configuration.

Running scalastyle from the command line (pre-0.6.0)

Download scalastyle-batch.

This zip contains an executable jar along with the dependencies in lib/. Unzip this file somewhere, and run the jar like:

$ java -jar scalastyle-batch_2.10.jar --config lib/scalastyle_config.xml src/main/scala

or similar. You’ll need a configuration.