How can I manually install and set up the checkstyle linter for Vim and ALE? #4082
-
I'm trying to lint
I have an old MacBook with OSX Yosemite, so I cannot use Homebrew to download and install checkstyle as some of the required components (like Go) will not install on my machine. I downloaded
Finally, I updated the global variable
I can use checkstyle from the command line with However, ALE's linting does not work with checkstyle. I searched all over the Internet and tried many different variations, but nothing worked. I've attached a screenshot of the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
ALE requires a binary called "checkstyle" to be present on your PATH in order to find it and use it. Simplest way to get it to work on your environment is to create an executable bash script named "checkstyle" that calls whatever command needed to run the jar: #!/bin/sh
java -jar /path/to/checkstyle.jar com.puppycrawl.tools.checkstyle.Main "$@" Copy the bash script into your path (e.g. /usr/local/bin/checkstyle) and make it executable (e.g. chmod +x /usr/local/bin/checkstyle). Note you will have to ensure the script accepts and passes any arguments directly (e..g "$@"). |
Beta Was this translation helpful? Give feedback.
ALE requires a binary called "checkstyle" to be present on your PATH in order to find it and use it. Simplest way to get it to work on your environment is to create an executable bash script named "checkstyle" that calls whatever command needed to run the jar:
Copy the bash script into your path (e.g. /usr/local/bin/checkstyle) and make it executable (e.g. chmod +x /usr/local/bin/checkstyle). Note you will have to ensure the script accepts and passes any arguments directly (e..g "$@").