In this section:
cpptest.result.line.suppressions.enabled
This setting enables or disables creating regex-based line suppressions.
Acceptable Values
| true | Enables creating regex-based line suppressions. |
|---|---|
| false | Disables creating regex-based line suppressions. |
The following configuration enables regex-based line suppressions:
cpptest.result.line.suppressions.enabled=true
cpptest.result.line.suppressions.pattern
This setting specifies a semicolon-separated list of regex patterns to create line suppressions.
Acceptable Values
| [regex] | A regex pattern. |
|---|
Example Usage
The following configuration suppresses all findings detected on code lines that contain "Q_" anywhere on the line.
cpptest.result.line.suppressions.enabled=true
cpptest.result.line.suppressions.pattern= .*Q_.*
suppression{n}.file.ext
This setting specifies the extension file types that should be scanned for suppression comments.
Acceptable Values
| [file extension] | The extension of files that will be searched for suppressions. |
|---|
Example Usage
The following configuration searches .xml and .java files for suppression comments:
suppression1.file.ext=xmlsuppression2.file.ext=java
Related
suppression{n}.comment
This setting specifies the prefix for suppression comments for files specified with the suppression{n}.file.ext property.
Acceptable Values
| [comment marker] | The prefix marker for suppression comments. |
|---|
Example Usage
The following configuration specifies the // and <!-- prefixes of suppression comments:
suppression1.comment=//suppression2.comment=<!--
Related
suppression{n}.comment.suffix
This setting specifies the suffix for suppression comments for files specified with the suppression{n}.file.ext property. If this setting is not configured, suppression comments will not be suffixed.
Acceptable Values
| [comment marker] | The suffix marker for suppression comments. |
|---|
Example Usage
The following configuration specifies the --> suffix of suppression comments:
suppression1.comment.suffix=-->
Related
suppression{n}.block.only
This setting enables or disables block-only comment suppressions support for files specified with the suppression.file.ext property.
Acceptable Values
| true | The block-only comment support for suppressions is enabled. |
|---|---|
| false | Default. The block-only comment support for suppressions is disabled. |
The following configuration enables the block-only comment support for suppressions.
suppression1.block.only=true
Related
suppression{n}.line.disabled
This setting enables or disables automatic line suppressions in the source code in the IDE.
Acceptable Values
| true | Automatic line suppressions in the source code are disabled. (Note: Line suppressions can be still added manually). |
|---|---|
| false | Default. Automatic line suppressions in the source code are enabled. |
The following configuration disables automatic line suppressions in the source code.
suppression1.line.disabled=true
Related
suppression.infile.location
This setting specifies the location of a suppression file that will be used for suppressing violations both in the CLI and IDE.
Acceptable Values
| [path] | The path to the suppression file that will be used for suppressing violations both in the CLI and IDE. It can be defined:
|
|---|
Example Usage
suppression.infile.location=C:/parasoft/suppression/storage/parasoft.suppress
Related
suppression.unused.report
This setting enables reporting unused suppression records (suppression comments in source code and entries in suppressions files) at the end of analysis. The results will be included in the XML report.
Acceptable Values
| true | Reporting unused suppressions is enabled. |
|---|---|
| false | Default. Reporting unused suppressions is disabled. |
suppression.unused.rules
This setting specifies the scope of suppressions to consider when detecting unused suppressions.
Acceptable Values
| enabled | Considers suppression records for rules that are enabled in the selected test configuration. |
|---|---|
| all | Considers all suppression records. |
suppression.unused.remove
This setting specifies whether unused suppression records (in source code or suppression files) will be automatically removed at the end of analysis.
Before enabling this setting, create a backup copy of the code or ensure it is managed under source control to facilitate change review and reversion, if needed.
Acceptable Values
| true | Unused suppression comments will be automatically removed at the end of analysis. |
|---|---|
| false | Default. Unused suppression comments will not be removed. |