Static analysis

Sam Price thesamprice at gmail.com
Sun May 21 03:48:50 UTC 2023


Thanks Alex,
I was able to write a variable analyzer using the compile_database.

https://gist.github.com/thesamprice/d4a19102aa4fe11fb96a75df57b9fcfe

On Mon, May 15, 2023 at 9:31 PM Sam Price <thesamprice at gmail.com> wrote:
>
> Thanks Alex,
> I was able to run cppcheck.
> I had to install the newest cppcheck from source to get access to the
> --project flag.
> i ran
> bear ./waf
> and then
> cppcheck --project=compile_commands.json
>
> It returned a few static analysis errors if interested.
> I'll attach the results when it finishes running.
> It is possible I don't have this configured properly, and its using
> its own #defines
>
>
> On Mon, May 15, 2023 at 11:03 AM Alex White <alex.white at oarcorp.com> wrote:
> >
> > You should be able to use `bear` (https://github.com/rizsotto/Bear). I have it installed via my package manager.
> >
> > After a `./waf clean`, run `bear -- ./waf` to generate compile_commands.json. Then you should be able to run `cppcheck --project=compile_commands.json`.
> >
> > Alex
>
>
>
> --
> Sincerely,
>
> Sam Price



-- 
Sincerely,

Sam Price


More information about the devel mailing list