Page History
...
- Open the Extensions panel. Search for and install the
Checkstyle for Java
extension by ShengChen. Follow the configuration docs for the plugin. The important parts are: set the configuration file, by right clicking thecheckstyle.xml
file and selectSet the Checkstyle Configuration File
. You will need to use the commandCheckstyle: Set the Checkstyle Version
(Help>Show All Commands, or hit F1 on your keyboard) to manually set the Checkstyle version to8.36.2
. The extension will automatically download the required checkstyle jar file if it needs to. Other versions of Checkstyle jar are known to not work (8.18 and 9.2.1 as of this writing all currently throw errors). - You'll need to restart VSCode after adding the Checkstyle for Java extension
- You will want to modify the setting for Java → Completion: Import Order (in the
settings.json
file for VScode): add this to yoursettings.json
file:"java.completion.importOrder": ["#","java","javax","com","org"],
Checking code style from commandline
...
Overview
Content Tools