Config a CodeCC task

Execution mode

Plug-in execution can be synchronous or asynchronous. In synchronous mode, code inspection tasks are created while the plug-in is in use. In the asynchronous mode, you need to create a code review task of the "self-created task" type on the code review page, and then select the corresponding task in the pipeline. Synchronous execution mode:

Asynchronous execution mode:

The synchronous execution mode is recommended

Scan configuration

Incremental scan: Scan for code differences between this build and the last build. The first scan was full. MR/PR scan: Scan the difference code between the source and target branches of MR/PR. The source branch code needs to be pulled into the workspace.

Full scan: Scan all code. Klocwork, Pinpoint, Gometalinter, and repetition rate only support this scanning mode.

Path mask

Path mask: Path whitelist and Path blacklist Path whitelist: After this parameter is set, code check scans only the files in the whitelist path. Wildcard characters are supported. In absolute path /data/landun/workspace/CodeCCTest/cpp/For example:

  1. Scan the relative path/CodeCCTest/cpp/, input only/cpp/Will not take effect; Scan for a file such as protobuffer*.pb.cc, you can enter.*/.*\.pb\.cc;

  2. Scan a folder in the workspace, such as P2PLive, and enter it.*/P2PLive/.*;

  3. Scan only certain types of files in a folder, such as P2PLive*.c, you can enter.*/P2PLive/.*\.c;

  4. If multiple paths or path matching type are entered in a row, separate them using commas (,).

  5. Support pipeline variables

Path blacklist: Code check does not scan all files in the path. Wildcard characters are supported.

  1. Mask certain files, such as those generated by protobuffer *.pb.cc, you can enter.*/.*\.pb\.cc;

  2. Mask a folder in all branches, such as P2PLive.*/P2PLive/.*;

  3. Mask certain files in a folder, for example, P2PLive*.c, you can enter.*/P2PLive/.*\.c;

  4. If multiple path matching modes are entered in a line, separate them with commas (,).

  5. Support pipeline variables

Last updated