In this section:
This setting enables or disables creating regex-based line suppressions.
| 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
This setting specifies a semicolon-separated list of regex patterns to create line suppressions.
| [regex] | A regex pattern. |
|---|
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_.*
This setting specifies the extension file types that should be scanned for suppression comments.
| [file extension] | The extension of files that will be searched for suppressions. |
|---|
The following configuration searches .xml and .java files for suppression comments:
suppression1.file.ext=xmlsuppression2.file.ext=java
This setting specifies the prefix for suppression comments for files specified with the suppression{n}.file.ext property.
| [comment marker] | The prefix marker for suppression comments. |
|---|
The following configuration specifies the // and <!-- prefixes of suppression comments:
suppression1.comment=//suppression2.comment=<!--
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.
| [comment marker] | The suffix marker for suppression comments. |
|---|
The following configuration specifies the --> suffix of suppression comments:
suppression1.comment.suffix=-->
This setting enables or disables block-only comment suppressions support for files specified with the suppression.file.ext property.
| 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
This setting enables or disables automatic line suppressions in the source code in the IDE.
| 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
This setting specifies the location of a suppression file that will be used for suppressing violations both in the CLI and IDE.
| [path] | The path to the suppression file that will be used for suppressing violations both in the CLI and IDE. It can be defined:
|
|---|
suppression.infile.location=C:/parasoft/suppression/storage/parasoft.suppress
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.
| true | Reporting unused suppressions is enabled. |
|---|---|
| false | Default. Reporting unused suppressions is disabled. |
This setting specifies the scope of suppressions to consider when detecting unused suppressions.
| enabled | Considers suppression records for rules that are enabled in the selected test configuration. |
|---|---|
| all | Considers all suppression records. |
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. |
| true | Unused suppression comments will be automatically removed at the end of analysis. |
|---|---|
| false | Default. Unused suppression comments will not be removed. |