Help Center> CodeCheck> User Guide> (Optional) Configuring a Rule Set> Configuring a CodeCheck Rule Set
Updated on 2022-09-30 GMT+08:00

Configuring a CodeCheck Rule Set

By default, CodeCheck supports rule sets in Java, C++, PHP, JavaScript, TypeScript, HTML, CSS, Go, and Python, and each language type corresponds to multiple rule sets of different levels. Table 1 lists system rule sets.

  • You can add, copy, modify, or delete a rule set as required.
  • On the DevCloud homepage, choose Services > CodeCheck. On the CodeCheck homepage that is displayed, click the Rule Sets tab. All system rule sets are displayed.
Table 1 System rule sets

Language

System Rule Set

Java

  • Key check rule set
  • General check rule set
  • Comprehensive check rule set
  • Security check rule set

CSS

  • General check rule set

JS

  • Key check rule set
  • General check rule set
  • Comprehensive check rule set

TypeScript

  • Key check rule set
  • General check rule set
  • Comprehensive check rule set

HTML

  • General check rule set

C++

  • Key check rule set
  • General check rule set
  • Comprehensive check rule set

PHP

  • Key check rule set
  • General check rule set

Go

  • Key check rule set
  • General check rule set
  • Comprehensive check rule set

Python

  • Key check rule set
  • General check rule set

Procedure

  1. On the DevCloud homepage, choose Services > CodeCheck. The CodeCheck homepage is displayed.
  2. Click the Rule Sets tab. The check rule set list page is displayed.

    Add, modify, delete, view, copy, or set rule sets as required.
    Table 2 Rule set operation description

    Operation

    Description

    Add a rule set

    On the Rule Sets tab page, click New. You can customize a rule set. For details, see Customizing a CodeCheck Rule Set.

    Configure (Modifying) a rule set

    Click in the row where the rule set is located and choose Modify Basic Information. The Configure Rule Set page is displayed. You can select rule sets and set issue levels as required.

    Cop a rule set

    Click in the row where the rule set is located and choose Copy.
    NOTE:

    A rule set name must be unique.

    Default rule set (under a project)

    On the project details page, choose Code > Code Check > Rule Sets. On the Rule Sets tab page that is displayed, click in the row where the rule set is located and select defaultSet to set it as the default check rule set of a CodeCheck task in the project.

    Delete a rule set

    To delete a rule set, click in the row where the rule set is located and choose Delete. For details, see Deleting a Custom CodeCheck Rule Set.

    NOTE:
    • System rule sets and rule sets in use cannot be deleted.
    • System rule sets can only be viewed and copied.

    View a rule set

    You can click a rule set name to view its details.

    Configure a rule set

    Go to a check details page, choose Settings > Rule Sets, select the created rule set, and set it as the check rule set for the task. For details, see Customizing a CodeCheck Rule Set.