Click here to Skip to main content
15,888,579 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
What is the default analysis ruleset for the C++ Static Analysis ?

I can enable is with the /analyze flag.

MSDN just says "Turns on analysis in the default mode."

BTW, I know I can enable the analysis in the Code Analysis project property and that works.

What I have tried:

I tried tweaking some of the default ruleset files, but it looks like they are not used.

I even tried to explicitly use the full /analyze:ruleset NativeMinimumRules.ruleset flag but it does not work.
The complete line:
/analyze:ruleset "c:\users\lincourM\Desktop\NativeRecommendedRules.ruleset"


the ruleset contains :
<Rule Id="C6001" Action="Error" />
<Rule Id="C6011" Action="Error" />


and I get warnings instead of errors:

1>c:\users\lincourm\documents\project\teststaticanalysis\teststaticanalysis\teststaticanalysis.cpp(9): warning C6011: Dereferencing NULL pointer 'p'. : Lines: 8, 9
1>c:\users\lincourm\documents\project\teststaticanalysis\teststaticanalysis\teststaticanalysis.cpp(23): warning C6001: Using uninitialized memory 'i'.: Lines: 17, 18, 23
Posted
Updated 1-Oct-18 8:20am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900