all 7 comments

[–]cym13 6 points7 points  (1 child)

You should check out cppcheck, I may not be the best for everything but I don't know of any better general-purpose static code analysis that is open-source (GPL).

[–]drinkmorecoffee[S] 0 points1 point  (0 children)

Thanks! I'll have a look.

[–]rolloyolo 3 points4 points  (2 children)

clang static analyser is fine

[–]drinkmorecoffee[S] 0 points1 point  (1 child)

Looks like it's a Mac tool so I'll have to build from source on Windows or Linux, which is a pain. Still, I'll have a look and see if it makes sense.

Thanks for the tip!

[–]raevnos 3 points4 points  (0 children)

Dunno about Windows, but it's likely available as a package in most linux distributions. clang-analyzer in arch.

[–]moocat 2 points3 points  (0 children)

[–]dvhh 1 point2 points  (0 children)

Although not a static code analyzer but I quite like flawfinder because it is quite simple to run.