Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Create an advanced settings file that includes C/C++test's advanced scope settings. See Advanced Scope Settings for a complete list of available settings. The contents of the advanced settings file may resemble the following:

    Code Block
    // This configuration narrows down the scope of analysis to locally modified files
    // (including header files).
    scope.sourcecontrol=true
    scope.scontrol.files.filter.mode=local
    cpptest.scope.adjuster.cu.enabled=true
    Code Block
    // This configuration narrows down the scope of analysis to files (including header files)
    // on the current working branch that differ from the main stream of development:
    scope.sourcecontrol=true
    scope.scontrol.files.filter.mode=branch
    cpptest.scope.adjuster.cu.enabled=true
    Code Block
    // This configuration narrows down the scope of analysis to files (including header files)
    // on the current working branch that differ from branch "feature_372":
    scope.sourcecontrol=true
    scope.scontrol.files.filter.mode=branch
    scope.scontrol.ref.branch=feature_372
    cpptest.scope.adjuster.cu.enabled=true
    Code Block
    //This configuration narrows down the scope of analysis to locally modified lines:
    scope.sourcecontrol=true
    scope.scontrol.files.filter.mode=local
    scope.scontrol.lines.filter.mode=local
    Code Block
    //This configuration narrows down the scope of analysis to lines that are different between the current working branch and the main stream of development:
    scope.sourcecontrol=true
    scope.scontrol.files.filter.mode=branch
    scope.scontrol.lines.filter.mode=branch
    Code Block
    //This configuration narrows down the scope of analysis to lines that are different between the current working branch and branch "feature_372":
    scope.sourcecontrol=true
    scope.scontrol.files.filter.mode=branch
    scope.scontrol.lines.filter.mode=branch
    scope.scontrol.ref.branch=feature_372
  2. Specify the path to the advanced settings. See Configuring an Advanced Settings File for details.

...

Anchor
Advanced Scope Settings
Advanced Scope Settings
Advanced Scope Settings

Note
To use the following settings, the scope.sourcecontrol option must be enabled. 
SettingDescription
scope.scontrol.files.filter.mode=localChecks only locally modified files.
scope.scontrol.files.filter.mode=branchChecks only files on the current working branch that differ from the reference branch. By default, the reference branch is the main integration stream, such as "master", "trunk", etc. You can specify a custom branch with scope.scontrol.ref.branch.

scope.scontrol.lines.filter.mode=all

Default. Checks all lines in the scope.
scope.scontrol.lines.filter.mode=localChecks only locally modified lines.
scope.scontrol.lines.filter.mode=branchChecks only lines that are different between the current working branch and the reference branch. By default, the reference branch is the main integration stream, such as "master", "trunk", etc. You can specify a custom branch with scope.scontrol.ref.branch.
scope.scontrol.ref.branch=[branch or revision]Specifies the name or ID of the branch or revision with which the current working branch is compared to identify and analyze modified files. It applies when the scope.scontrol.files.filter.mode option is set to branch.
cpptest.scope.adjuster.cu.enabled=true

Enables checking all files that belong to the same compilation unit as the file that has been modified. This applies to both source files and header files.

C/C++test cannot analyze header files directly. This option allows you to ensure that modified header files are analyzed, even if the source files that include them remain unchanged.