Versions Compared

Key

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

...

The input scope defines the C and C++ source files to test with C/C++test. The input scope also provides the full set of information about compiler options and environment, so C/C++test can re-create the original build environment to provide accurate test results. See Running Static Analysis 1 for information about defining compilers.

...

Anchor
Defining Source File Structures

...

Defining Source File Structures

...

Defining Source File Structures (Modules)

C/C++test treats the input scope as a set of unrelated source files. Defining modules allows you to introduce a well-defined source file structure and add additional files, such as header files, into the Input Scope. 

...

You can restrict the scope of analysis to locally modified files or to files modified on the current working branch by setting up additional file filters. This allows you to focus on identifying and fixing bugs introduced by your recent code changes before the code is checked in your source control system or merged with the main development stream.

Info
iconfalse

While modifying the default scope allows you to speed up analysis, it may impact violations reported by rules that require information about other resources included in the project. In particular, rules that analyze execution paths, calculate metrics, or check for duplicate code may be prone to reporting false positives or negatives if they have no access to files excluded from the scope.

For this reason, we recommend that you regularly perform full-scope analysis to ensure that all rule violations are detected. One example scenario is that a limited scope is analyzed when working with C/C++test on the desktop, while a full-scope analysis is performed during automated builds on a server.

Prerequisites

...

Code Block
scope.scontrol.files.filter.mode=branch
scope.scontrol.ref.branch=[name/ID of the custom reference branch/revision]
cpptest.scope.adjuster.cu.enabled=true

The scope filter settings configured in the .properties file affect all test configurations.


See Scope and Authorship Settings.

...