Help Center> CodeArts Check> User Guide> (Optional) Setting a Rule Set> Adding a Custom Code Check Rule Set
Updated on 2024-04-16 GMT+08:00

Adding a Custom Code Check Rule Set

  • In addition to system rule sets, you can customize rule sets.
  • At least one rule must be set for each rule set template.

Purchase the code security check enhancement package as required before using CodeArts Check. This package identifies code security risks and vulnerabilities more comprehensively for Java, C++, Go, and Python.

Prerequisite

A rule set can be configured with only one language.

Procedure

  1. Go to the Task page and click the Rule Sets tab.
  2. Click Create Rule Set. In the displayed dialog box, enter a rule set name and description, and select a language.

    (Optional) You can also copy an existing rule set by selecting it from the Replicated in drop-down list.

  3. Click OK.
  4. Select rule names, set rule levels as required, and click Save in the upper right corner.

    The following uses a code security check enhancement package of a Java rule set as an example:

  5. Go to the View Task Details page, click Settings tab, and choose Rule Sets. On the displayed page, click in the row where Languages Included is located to re-obtain the code repository language, enable the target language, and select the configured custom rule set. For details, see Configuring a Rule Set.
  6. Click Start Check to run the check task based on the custom rule set.