...
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.
...
- Description of the concept of the .bdf and how to create it, see Running Static Analysis 1.
- Description of the steps for using the .bdf for analysis, see Running Static Analysis 1.
- Description of how to broaden the scope of files tested, including header files, see Defining Source File Structures (Modules).
Anchor | ||
---|---|---|
|
...
|
...
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 | ||
---|---|---|
| ||
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
- Connection to a supported source control system must be properly configured (see Connecting to Source Control and Source Control Settings).
- The
scope.scontrol
=true
setting must be configured to enable computing authorship based on your source control system (see Scope and Authorship Settings).
...
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.
...