Enable specific defect and coding standard checkers using a checkers file created from a checkers selection interface
-checkers-activation-file checkersFile.xml
-checkers-activation-file enables specific defect and coding standards checkers for a Bug Finder analysis. You can select the checkers on a graphical user interface and then create the file checkersFile.xml from this interface.checkersFile.xml
This option is an improved version of a similar option Set checkers by file
(-checkers-selection-file) (Polyspace Bug Finder). The improvements are the following:
This option is sufficient to both specify checkers and enable them. The option
-checkers-selection-file only specifies a set of checkers
for the analysis using a checkers selection file. You have to enable them
separately using the value from-file for one of the coding
standards options (such as -misra3 or
-autosar-cpp14).
This option enables both defect and coding standard checkers. The option
-checkers-selection-file covers coding standard checkers
only. To specify and enable defect checkers, you have to then use the option
-checkers with a comma-separated list of defect checker
names.
Both options -checkers-activation-file and
-checkers-selection-file require an XML file with the checker
specifications as argument. The XML files have the same format with the only difference
coming from the fact that -checkers-activation-file enables defect
checkers in addition to coding standard checkers. The XML file for
-checkers-activation-file has this additional
element:
<standard name="Bug Finder Findings">
<section name="Numerical">
<check name="INT_ZERO_DIV" state="on">
<check name="INT_CONV_OVFL" state="on">
...
</section>
</standard>-checkers-activation-file with
the option -checkers-selection-file, the defect checker specification in
the XML is not used at all. (In this case, checkers enabled with the option
-checkers are used. If you do not use the option
-checkers, only the default defect checkers are used.)You can select checkers in a graphical user interface and then generate an XML file from the selection. You or other developers can use this XML file with the option -checkers-activation-file for a Bug Finder analysis.
Open the graphical user interface to select checkers. At the command line, enter:
polyspace-checkers-selection
checkers.xml.Specify the previously created XML file with the option -checkers-activation-file.
Bug Finder:
polyspace-bug-finder -sources file.c -checkers-activation-file checkers.xml
Bug Finder Server:
polyspace-bug-finder-server -sources file.c -checkers-activation-file checkers.xml
If you use Polyspace® as You Code extensions in IDEs, this option is implemented through the IDE extension setting. You do not have to use this option explicitly. If you want to explicitly use this option, enter the option in an analysis options file. See options file.