File checkstyle.pod of Package checkstyle

=encoding utf8

=head1 NAME

checkstyle - Java code quality tool

=head1 SYNOPSIS

checkstyle
[B<-dEghjJtTV>]
[B<-b>=I<xpath>] [B<-c>=I<configurationFile>] [B<-f>=I<format>]
[B<-o>=I<outputPath>] [B<-p>=I<propertiesFile>]
[B<-s>=I<suppressionLineColumnNumber>]
[B<-w>=I<tabWidth>] [B<-e>=I<exclude>]… [B<-x>=I<excludeRegex>]…
I<files>…

=head1 DESCRIPTION

Checkstyle verifies that the specified source code files adhere to the
specified rules. By default, violations are reported to standard out in plain
format. Checkstyle requires a configuration XML file that configures the checks
to apply.

=head1 OPTIONS

=over

=item I<files>…

One or more source files to verify.

=item B<-b>, B<--branch-matching-xpath>=I<xpath>

Shows Abstract Syntax Tree (AST) branches that match given XPath query.

=item B<-c>=I<configurationFile>

Specifies the location of the file that defines the configuration modules. The
location can either be a filesystem location, or a name passed to the
C<ClassLoader.getResource()> method.

=item B<-d>, B<--debug>

Prints all debug logging of CheckStyle utility.

=item B<-e>, B<--exclude>=I<exclude>

Directory/file to exclude from CheckStyle. The path can be the full, absolute
path, or relative to the current path. Multiple excludes are allowed.

=item B<-E>, B<--executeIgnoredModules>

Allows ignored modules to be run.

=item B<-f>=I<format>

Specifies the output format. Valid values: C<xml>, C<sarif>, C<plain> for
C<XMLLogger>, C<SarifLogger>, and C<DefaultLogger> respectively. Defaults to
C<plain>.

=item B<-g>, B<--generate-xpath-suppression>

Generates to output a suppression xml to use to suppress all violations from
user’s config. Instead of printing every violation, all violations will be
catched and single suppressions xml file will be printed out. Used only with
B<-c> option. Output location can be specified with B<-o> option.

=item B<-h>, B<--help>

Show this help message and exit.

=item B<-j>, B<--javadocTree>

This option is used to print the Parse Tree of the Javadoc comment. The file
has to contain only Javadoc comment content excluding C<'/**'> and C<'*/'> at
the beginning and at the end respectively. It can only be used on a single file
and cannot be combined with other options.

=item B<-J>, B<--treeWithJavadoc>

This option is used to display the Abstract Syntax Tree (AST) with Javadoc
nodes of the specified file. It can only be used on a single file and cannot be
combined with other options.

=item B<-o>=I<outputPath>

Sets the output file. Defaults to stdout.

=item B<-p>=I<propertiesFile>

Sets the property files to load.

=item B<-s>=I<suppressionLineColumnNumber>

Prints xpath suppressions at the file’s line and column position. Argument is
the line and column number (separated by a C<:> ) in the file that the
suppression should be generated for. The option cannot be used with other
options and requires exactly one file to run on to be specified. Note that the
generated result will have few queries, joined by pipe (C<|>). Together they
will match all AST nodes on specified line and column. You need to choose only
one and recheck that it works. Usage of all of them is also ok, but might
result in undesirable matching and suppress other issues.

=item B<-t>, B<--tree>

This option is used to display the Abstract Syntax Tree (AST) without any
comments of the specified file. It can only be used on a single file and cannot
be combined with other options.

=item B<-T>, B<--treeWithComments>

This option is used to display the Abstract Syntax Tree (AST) with comment
nodes excluding Javadoc of the specified file. It can only be used on a single
file and cannot be combined with other options.

=item B<-V>, B<--version>

Print version information and exit.

=item B<-w>, B<--tabWidth>=I<tabWidth>

Sets the length of the tab character. Used only with B<-s> option. Default
value is 8.

=item B<-x>, B<--exclude-regexp>=I<excludeRegex>

Directory/file pattern to exclude from CheckStyle. Multiple excludes are
allowed.

=back

=head1 LICENSE

CheckStyle is released under the L<GNU Lesser General Public License v2.1 or
later|https://spdx.org/licenses/LGPL-2.1-or-later.html>.

=head1 SEE ALSO

L<https://checkstyle.org/>.
openSUSE Build Service is sponsored by