To install the latest version, add the following to the
lib/bld/bld-wrapper.properties file:
bld.extension-checkstyle=com.uwyn.rife2:bld-checkstyleFor more information, please refer to the extensions documentation.
Check Source Code with Checkstyle
To check your code with Chesktyle, include the following in your build file:
@BuildCommand(summary = "Check code style") public void checkstyle() throws Exception { new CheckstyleOperation() .fromProject(this) .configurationFile("config/sun_checks.xml") .execute(); }
./bld checkstylePlease check the CheckstyleOperation documentation for all available configuration options.
Checkstyle Dependency
Don't forget to add a Checkstyle test dependency to your build file, as it is
not provided by the extension. For example:
repositories = List.of(MAVEN_CENTRAL); scope(test) .include(dependency("com.puppycrawl.tools", "checkstyle", version(13, 4, 2)));