Skip to content
Horacio Sanson edited this page May 29, 2019 · 3 revisions

Linter installation guides

Checkstyle

The easiest way to install checkstyle so it is automatically detected by ALE is via package managers:

apt install checkstyle  # Ubuntu/Linux
brew install checkstyle # MacOS

You can also download the latest checkstyle-8.XX-all.jar file from the official download page and create a custom launch script like the one below to start checkstyle:

#!/bin/sh

java -jar checkstyle-8.XX-all.jar "@"

The advantages of using launch scripts is that you can use the latest version of checkstyle and add custom options to the command line:

#!/bin/sh

java -classpath MyCustom.jar;checkstyle-8.7-all.jar \
    com.puppycrawl.tools.checkstyle.Main "$@"

Once you create the launch script save it as checkstyle somewhere on your $PATH so ALE can find and use it. Also make sure to make the launch script executable:

chmod u+x checkstyle

Notes:

  1. Do not add the -c option to the launch script. This option will be added by ALE when invoking the command.
Clone this wiki locally