bld Checkstyle Extension https://github.com/rife2/bld-checkstyle
Find a file
2025-03-25 12:04:32 -07:00
.github/workflows Add OS matrix for Ubuntu, Windows and macOS 2025-03-25 12:04:32 -07:00
.idea Bump bld to version 2.2.1 2025-02-25 09:45:04 -08:00
.vscode Bump bld to version 2.2.1 2025-02-25 09:45:04 -08:00
config Updated dependencies 2024-10-26 05:30:06 -07:00
examples Add checkstyle-custom command 2025-03-25 12:04:04 -07:00
lib/bld Bump Checkstyle to version 10.21.4 2025-03-04 09:34:08 -08:00
scripts Execute cliargs script before running tests 2024-05-28 14:01:45 -07:00
src Only check checkstyle arguments on Linux 2025-03-25 12:02:17 -07:00
.gitignore Initial commit 2023-08-28 00:55:08 -07:00
bld Initial commit 2023-08-28 00:55:08 -07:00
bld.bat Initial commit 2023-08-28 00:55:08 -07:00
LICENSE.txt Initial commit 2023-08-28 00:55:08 -07:00
README.md Add generic installation instructions 2025-03-18 13:00:04 -07:00

Checkstyle Extension for bld

License Java bld Release Snapshot GitHub CI

To install the latest version, add the following to the lib/bld/bld-wrapper.properties file:

bld.extension-checkstyle=com.uwyn.rife2:bld-checkstyle

For 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 checkstyle

Please 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(10, 21, 4)));