このページは、お客様の言語ではご利用いただけません。Huawei Cloudは、より多くの言語バージョンを追加するために懸命に取り組んでいます。ご協力ありがとうございました。
- What's New
- Function Overview
- Service Overview
- Getting Started
-
User Guide
- Working with CodeArts Check
- Purchasing CodeArts Check
- Configuring Project-level Role Permissions
- Creating a Task
- Configuring a Task
- Executing a Task
- Viewing Check Results
- Querying Audit Logs
- Reference
- Best Practices
-
API Reference
- Before You Start
- API Overview
- Calling APIs
-
APIs
-
Task Management
- Creating a Check Task
- Deleting a Check Task
- Querying Tasks
- Executing a Check Task
- Stopping a Check Task
- Querying the Status of a Task
- Querying Historical Check Results
- Querying Selected Rule Sets of a Task (Version 2)
- Querying Selected Rule Sets of a Task (Version 3)
- Querying the Check Parameters of a Rule Set (Version 2)
- Querying the Check Parameters of a Rule Set (Version 3)
- Configuring the Check Parameters of a Task
- Modifying the Rule Set in a Task
- Querying Check Failure Logs
- Obtaining the Directory Tree of a Task
- Ignoring Directories of a Task
- Querying Advanced Configurations of a Task
- Configuring Advanced Configurations for a Task
- Issue Management
- Rule Management
-
Task Management
- Application Examples
- Appendixes
- Description
-
FAQs
-
General Issues
- Why Am I Told that a Task Is Running and I Should Try Again Later?
- Why Am I Told that I Don't Have Sufficient Permissions and I Should Check and Try Again?
- Why Am I Told that Cppcheck Cannot Tokenize the Code Correctly?
- Why Am I Told that No Dependency Exists in the Maven Repository?
- Why Am I Seeing Error CC.00070400.500?
- Why Don't I Have Enough Permissions When Clicking a Task Name?
- Why Does a Project with WPF in C# Fail?
- Why Is No Data Displayed After a Task Is Complete?
- Why Does a TypeScript Task Fail with a 404 Error in the Log?
- API Issues
-
General Issues
- Videos
- General Reference
Copied.
Configuring a Preset Rule Set
A rule set is a set of rules used for code checks, with variations within different sets. These sets are classified based on different objectives, such as security, Android apps, and coding styles.
You can modify the rule sets as needed, and the updated rules will be applied during the next check.
CodeArts Check supports rule sets in multiple languages at different levels. For details about system rule sets, see Table 1.
Rule sets of multiple languages cannot be used to check a task at the same time. Example: C# rule sets cannot be applied with other language rule sets to check a task.
Language |
System Rule Set |
Default Rule Set |
Extension of Supported File |
||
---|---|---|---|---|---|
C++ |
|
Generic Inspection Rule Set |
.c/.cc/.cpp/.cxx/.cp/.c++/.inc/.inl/.mm/.h/.hh/.hpp/.hxx/.h++ |
||
Java |
|
Generic Inspection Rule Set |
.java |
||
Go |
|
Generic Inspection Rule Set |
.go |
||
Python |
|
Generic Inspection Rule Set |
.py |
||
JavaScript |
|
Generic Inspection Rule Set |
.js/.jsx |
||
C# |
|
Generic Inspection Rule Set |
.cs |
||
TypeScript |
|
Generic Inspection Rule Set |
.ts/.tsx |
||
CSS |
|
Generic Inspection Rule Set |
.css |
||
HTML |
|
Generic Inspection Rule Set |
.html |
||
PHP |
|
Generic Inspection Rule Set |
.php |
||
LUA |
General Criterion Set |
General Criterion Set |
.lua |
||
RUST |
General Criterion Set |
General Criterion Set |
.rs |
||
Shell |
General Criterion Set |
General Criterion Set |
.sh |
||
KOTLIN |
General Criterion Set |
General Criterion Set |
.kt |
/ |
detektout |
Viewing Rule Details in a Rule Set
View the rule details in rules sets, such as issue levels, compliant and non-compliant examples, and fix suggestions, to select a desired rule set.
- Access CodeArts Check through a project.
- Click the Rule Sets tab.
- Click the rule set name to go to the details page.
Alternatively, click Export to export the enabled rules in the rule set to the local PC and view the rule details.
Modifying the Default Rule Set
Each language has its default set, as shown in Table 1. Perform the following operations to modify the default rule set if needed.
To view the default rule sets, access CodeArts Check through a project.
- On the Rule Sets tab page, filter the target language in the Language column.
- Click
in the row where the rule set locates and select Default Set to set the current rule set as default.
Configuring the Rule Set to Be Used
Perform the following operations to use other preset rule sets. Alternatively, customize rule sets if needed. For details, see Configuring a Custom Rule Set.
- Go to the task page. In the task list, click a task name.
- On the task details page, choose Settings > Rule Sets.
- In the Languages Included area, enable the switch of target language.
- In the Enable Rule Set area, click
to select the rule set to be used.
(Optional) To configure extended parameters for the selected rule set, click Parameter, configure extended parameters, enable the configuration function, and click OK.
NOTE:
To use a code security enhanced package, you need to configure check parameters.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot