Are Defects Enabled by Default not enabled with Checkers Activation File?

When I used -checkers-selection-file, approx. 100 Defects were enabled by default (and I had 21 violations). See also https://www.mathworks.com/help/bugfinder/ug/polyspace-bug-finder-defects-checkers-enabled-by-default.html
I now switched to the option -checkers-activation-file, which is an improved version, and run the Bug Finder scan in the CI/CD pipeline and realized that I have 0 violations for Defects.
How is that possible and what did I wrong?
Or do I have to explicitly activate every rule?

 Réponse acceptée

Ronit
Ronit le 21 Juil 2025
Hello @Ismet,
When you use the "-checkers-activation-file" option in Polyspace Bug Finder, defect checkers are not enabled by default. Only those defect and coding rule checkers that you explicitly set to "on" in your activation XML file will be checked during analysis. If your activation file is empty or doesn’t activate any defect checkers, the analysis will not report violations, even if there are issues in your code.
This behavior is different from using "-checkers-selection-file", which always enables the default set of defect checkers in addition to any additional coding rule checkers you specify. That is why you observed violations before, but now you get none.
I hope this resolves your query!

6 commentaires

Thank you very much, this explains the different behavior. I would wish that this is explicitly mentioned in the docs by Mathworks
I changed the option back to "-checkers-selection-file" because the generated psbf file and html report show different results, which is weird.
But that is not a problem, my problem is now that Polyspace does not check several Default Defects from https://www.mathworks.com/help/bugfinder/ug/polyspace-bug-finder-defects-checkers-enabled-by-default.html since I added the option
-checkers INT_OVFL, FLOAT_OVFL, UNREACHABLE (etc.)
which it did before (I specified more Defects in Options File but shortened it for this post.)
My Options File look like this (shortened):
-checkers-selection-file .\\Tools\\Polyspace\\ruleset.xml
-guidelines from-file
-misra3 from-file
-checkers INT_OVFL, FLOAT_OVFL, UNREACHABLE (etc.)
In my Checkers File I only specified the MISRA and guideline IDs like (shortened):
<standard name="Guidelines">
<section name="Software Complexity">
<check id="SC01" state="on">
<threshold>10000</threshold>
</check>
</section>
</standard>
.....
<standard name="MISRA C:2012">
<section name="1 The implementation">
<check id="D1.1" state="on"/>
</section>
</standard>
Thats why I cannot verify "This behavior is different from using "-checkers-selection-file", which always enables the default set of defect checkers in addition to any additional coding rule checkers you specify." this behavior since I explicitly specified some Defects
When you explicitly specify defect checkers with "-checkers", you override the default defect selection. This means only the defect checkers you list with "-checkers" will be enabled and the rest of the default defect checkers will be disabled.
So its either the approx. 100 checkers, when not explicitly specified any checkers, or I specify some and thereby overwrite them.
How can I activate the default checkers and give some checkers in addition in a fast/short way?
Is this possible for example:
-checkers default, INT_OVFL, FLOAT_OVFL
I could not see in https://www.mathworks.com/help/bugfinder/ref/finddefectscheckersdisablecheckers.html if comma-seperated values for that option is possible or lets say a combination of them.
Yes, it is possible to use the checkers this way.

Connectez-vous pour commenter.

Plus de réponses (0)

Produits

Version

R2025a

Question posée :

le 18 Juil 2025

Commenté :

le 24 Juil 2025

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by