Configuring Check Scope
You can set check modes and checked catalogs for efficiency.
Constraints
- The secbrella engine does not support MR.
- The C# engine supports only full scan.
Configuring MR Check Modes
- Access CodeArts Check.
- Go to the task page. In the task list, click a task name.
- On the displayed task details page, choose Settings > Check Scope.
- In the MR Check area, select a check mode. By default, Changed Files is selected.
- Changed Files: Checks the files changed in the MR and collects all code issues in these files, including code issues in unchanged parts.
- Full Code: Checks all files in the source branch and collects all code issues in the source branch.
- Changed Code: Checks all files in the source and target branches and collects new code issues in the source branch compared with the target branch.

- After the configuration, click Save.
Verifying Check Scope
Verify whether the checked directories and ignored file lines you set are correct. If the verification fails, check the settings.
- Check whether directories or files exist.
- Check whether the files contain code that can be scanned.
Submodules cannot be verified.
Configuring Checked Directories
You can specify certain directories to be checked in the code repository.
- By default, all code in the code repository is checked.
- If you specify one or more directories, the files in the specified directories are checked.

- To check the dir1 and dir2 directories, enter dir1,dir2.
- To check dir3 in the dir1 directory, enter dir1/dir3.
- Specify directories instead of file names. Otherwise, all code in the code repository is checked by default.
- The specified directories cannot start with a period (.).
- By default, all directories are checked if you leave the text box empty. If you specify directories, all files within them are checked except for those that have been set to be ignored.
- This function takes effect only for the files that do not need to be compiled. If file B is generated after the compilation of file A, issues in file B are not reported.
Setting the Ignored File Mode
You can configure the file scope by task.
- If you do not specify a file path, all code of the selected repository branch is checked.
- If you specify a file path, the files in it are ignored during a check.
In the Ignored File List area, select the file paths that do not need to be checked. Run the code check task. The files in the selected paths will not be checked.

This function takes effect for the files that (do not) need to be compiled.
- Files that do not need to be compiled: If these files are set to be ignored, they are not checked.
- Files that need to be compiled: For example, file A and file B depend on each other. If file A is set to be ignored, file A is not checked, but file A is still involved in the compilation process before the check.
Regular Expression: Whitelisted users can use a regular expression to ignore the files that do not need to be checked. After the configuration, click Reg Verify. In the displayed window, test the entered expression. Non-whitelist users can contact technical support.
Expression description:
- Enter regular expressions that are enclosed in parentheses and need to be escaped.
- Only character strings of the directory/file are required.
- To exclude directories or files that contain test or llt, enter (test|llt); to exclude a path, enter (apps/syn/test/).
- To check directories or files that contain src or config, enter (^((?!(src|config)).)*$).
- To check directories or files that contain src or config, but exclude any that contains test or llt, enter ((^((?!(src|config)).)*$)|test|llt).
- Do not use spaces or end with a vertical bar (|). Otherwise, all files will be excluded.
After the configuration, click Save.
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