Intel® Inspector Help

Working with Suppressions from the Command Line

Suppression files - files containing suppression rules - can be created and applied using the Intel Inspectorinspxe-cl command tool, or using Intel Inspector GUI tools. When analysis is performed on the command line, the ability to apply suppressions is automatically enabled regardless of project or result settings.

A suppression file is a collection of suppression rules for problems identified during analysis that you want excluded from future analysis results. For example, these problems could be in code that is not your responsibility, in third-party libraries, or false positives. When a suppression file is used during a subsequent analysis run, suppressed problems are ignored so that you can focus on unsuppressed and newly detected problems.

From the command line, you can create a suppress-all file to suppress all detected problems that remain in a specified result. When the code has changed and there are new problems that you want to suppress, you can create additional suppression files through the command line for these new unfixed problems. To create or delete individual suppression rules from a suppression file, you can use the Intel Inspector GUI tools. To edit suppression rules, you can use a text editor.

Note

Suppression files can be used along with other problem-suppression tactics, such as assigning a problem the Not a Problem state, then filtering out all problems with this state when viewing problems in the GUI or generating a report on the command line. You can also propagate this state assignment forward into other results using one of the following techniques:

Limitations of Suppression Rules

Intel Inspector suppression rules generally remain effective for edited source code, but when lines of code are changed within a function where a problem is marked, the problem may not be recognized the next time the suppression file is used.

This is because Intel Inspector identifies a problem based on source code lines relative to the start of a function, rather than absolute line number values. This makes it easier to track problems marked for suppression as lines of code are inserted and deleted in source files. However, adding or deleting lines within a function, prior to the location of a suppressed problem, can cause a problem to no longer match the suppression rule. In these cases, the problem is designated as a new problem in the subsequent analysis. If Inspector did not do this, suppressions would fail any time a line of code is added or removed.

Tips for Working with Suppression Files