Skip to content

Latest commit

 

History

History
44 lines (27 loc) · 1.83 KB

command-line.markdown

File metadata and controls

44 lines (27 loc) · 1.83 KB
layout title
scalastyle
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.12-1.0.0-batch.jar "$@"

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

Download

Run the jar like:

$ java -jar scalastyle-batch_2.12.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.