Rate This Document
Findability
Accuracy
Completeness
Readability

Command References

During pipeline testing, Kunpeng native development provides a code specification check tool for checking the Java code specification in the test process.

Prerequisites

The Code Inspector has been installed. For details, see Installing Tools.

Command Function

Checks the Java code specification.

Syntax

code-inspector [-hV] [-c=<configurationFile>] [-f=<format>] [-o=<outputPath>] [-e=<exclude>] [-x=<excludeRegex>] <files>

<files> is a required parameter. Replace it with the file or folder to be checked for the code specification.

Parameter Description

Table 1 Parameter description

Parameter

Option

Description

-c

path

(Optional) Specifies the path to a rule set. If not specified, devkit_checkstyle.xml in the config directory is used by default.

-e/--exclude

path

(Optional) Specifies a directory or file to be excluded.

-f

xml/json/plain

(Optional) Specifies a format for the output of code specification violations. If not specified, plain is used by default.

-o

path

(Optional) Specifies a path for the output of code specification violations. If not specified, the standard output is used by default.

-V/--version

-

(Optional) Displays the version information.

-x/--exclude-regexp

regex pattern

(Optional) Specifies the regular expression of the directory or file to be excluded.