Updated on 2024-04-16 GMT+08:00

Rule Set List

CodeArts Check supports rule sets in Java, C++, PHP, C#, JavaScript, TypeScript, HTML, CSS, Go, Lua, Rust, Shell, and Python by default, and each language corresponds to multiple rule sets. System rule sets are listed in Table 1.

Table 1 System rule sets

Language

System Rule Set

Extension of Scannable File

C++

  • Critical Criterion Set
  • General Criterion Set
  • Comprehensive Criterion Set

.c/.cc/.cpp/.cxx/.cp/.c++/.inc/.inl/.mm/.h/.hh/.hpp/.hxx/.h++

Java

  • Critical Criterion Set
  • General Criterion Set
  • Comprehensive Criterion Set

.java

Go

  • Critical Criterion Set
  • General Criterion Set
  • Comprehensive Criterion Set

.go

Python

  • Critical Criterion Set
  • General Criterion Set

.py

JavaScript

  • Critical Criterion Set
  • General Criterion Set
  • Comprehensive Criterion Set

.js/.jsx

C#

  • Critical Criterion Set
  • General Criterion Set
  • Comprehensive Criterion Set

.cs

TypeScript

  • Critical Criterion Set
  • General Criterion Set
  • Comprehensive Criterion Set

.ts/.tsx

CSS

  • General Criterion Set

.css

HTML

  • General Criterion Set

.html

PHP

  • Critical Criterion Set
  • General Criterion Set

.php

Accessing Rule Sets

  1. Access the CodeArts Check page.
  2. On the displayed page, click the Rule Sets tab.

    You can add, modify, copy, delete, view, configure, or export rule sets as required. For details, see Table 2.
    Table 2 Rule set operation description

    Operation

    Description

    Add a rule set

    On the Rule Sets tab page, click Create Rule Set to customize a rule set. For details, see Adding a Custom Code Check Rule Set.

    Configure a rule set

    Click in the Operation column of the target rule set to access the Configure Rule Sets page. You can select rules and set rule levels on the displayed page.

    Modify the basic information of a rule set

    On the Configure Rule Sets page, click Modify Basic Info. You can modify the rule set name and description. For details, see Modifying a Custom Rule Set.

    Copy a rule set

    Click in the Operation column of the target rule set. In the displayed dialog box, set a rule set name to copy the rule set.
    NOTE:

    A rule set name must be unique.

    Default rule set (under a project)

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

    Delete a rule set

    Click in the row where the rule set is located and choose Delete Set. For details, see Deleting a Custom Code Check Rule Set.

    NOTE:

    You cannot delete system rule sets, rule sets not created by yourself and rule sets in use.

    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, click the Settings tab, choose Rule Sets, select a created rule set, and set it as the check rule set for the task. For details, see Configuring a Rule Set.

    Export a rule set

    Go to the Configure Rule Sets page of a rule set and click Export to export all its rules. For details, see Exporting a Rule Set.