How to run only a specific checker with scan-build (Static Analyzer)?

Hello everyone,

I have written a checker and wish to run it over a whole-program (entire project). I think the scan-build utility comes pretty handy in this case. But it has lots of default checkers enabled. I found no straightforward way to disable all of them, other than using the -disable-checker flag in scan-build for each one of them.

Hence my question: how to run only a specific checker with scan-build? OR how to disable all default checkers at once?

Worst comes to worst, I will just use the -disable-checker flag, but wanted to know if there’s a better way to accomplish this.

Regards,
Saheel.

Unfortunately, we don’t have such a flag for scan-build.

Note that some checkers depend on “core” checkers to be enabled. Some of the core checkers are responsible for modeling tasks, for example, dealing with noreturn functions.

Cheers,
Anna.

Unfortunately, we don’t have such a flag for scan-build.

Note that some checkers depend on “core” checkers to be enabled. Some of the core checkers are responsible for modeling tasks, for example, dealing with noreturn functions.

Hmmm… I am doing some simple debug stuff but I’ll keep that in mind if I run into some problem. Thanks!