


The file must be explicitly added with git add because git will ignore it by default. Such an exclusion file must contain one directory per line, with paths relative to the project root. Specific code files can be excluded from Checkstyle on a directory granularity with a file src//.checkstyle.exclude. If a project requires a different set of Checkstyle rules, this can be specified in mx.substratevm/suite.py by changing the value of the project’s checkstyle attribute (which, by default, references ). Of course, ensuring a reasonable use of these comments is a matter for code review. The default Checkstyle rules are defined in src//.checkstyle_checks.xml and define various special comments, including //Checkstyle: stop method name checkĪnd similar commands for other checks that can be disabled (including general stop and resume commands). It can be run manually with mx checkstyle. Source code formatting can be disabled with special comments: reformatting can be disabled like this: /*-Ĭheckstyle is used to verify adherence to the style rules.

The configuration includes special comments which can be used to relax checks in particular regions of code. The rule set has grown over time and proved to be useful, but the rules are open for discussion. In Eclipse, when a file is saved, it is automatically formatted according to these rules.

The IDE projects generated with mx ideinit are configured with strict formatting rules. Native Image Code Style Source Code Formatting Previous Next JavaScript must be enabled to correctly display this content
