nimble-code / Cobra

An interactive (fast) static source code analyzer
139 stars 31 forks source link

No output files when using cwe and misra2012 rule sets #50

Closed mjeronimo closed 2 years ago

mjeronimo commented 2 years ago

When using the -json option, there is sometimes and output file created and other times not, depending on the ruleset:

basic: _Basic_.txt cwe: No output file p10: _P10.txt (inconsistent naming, see https://github.com/nimble-code/Cobra/pull/47) jpl: _JPL_.txt misra2012: No output file

I would expect that all rulesets would output JSON consistently and with a consistent output filename convention.

nimble-code commented 2 years ago

true -- I will add the same reporting for cwe and misra2012 for consistency. thanks for reporting this!

nimble-code commented 2 years ago

Actually, for cwe, the individual checkers *cwe_119.cobra ... cwe_805.cobra, all produce their output in individual files. the toplevel checker cwe.cobra could of course combine all those in a single file CWE.txt, and delete the individual ones, but I'm not sure if that would be useful.... also, misra2012 does produce an output file, if any warnings are generated.... so I think it's all consistent