Static Code Analyzer for C++ in Linux

18,520

Solution 1

Solution 2

you can give a try pvs-studio:

http://www.viva64.com/en/pvs-studio/ (1)

also there is (bla-bla-lint): http://www.gimpel.com/html/index.htm (2)

missed note about linux, FlexeLint for C/C++ from (2) has linux support, (1) only for windows, you can check it only if your product crossplatform.

Solution 3

Take a look at clang's static analizer: http://clang-analyzer.llvm.org/

There are other tools like KLEE based on llvm, might worth a look, too.

Solution 4

You can also customize GCC (4.6) by using plugins (coded in C) or MELT extensions (MELT is a high-level domain specific language to extend and customize GCC). This approach could be appropriate if you have your own coding rules that you want to check. However, it does take some work.

Share:
18,520
Ajay
Author by

Ajay

Software engineer

Updated on June 07, 2022

Comments

  • Ajay
    Ajay about 2 years

    Possible Duplicate:
    What open source C++ static analysis tools are available?

    Does anybody know of an open source,good static code analyzer for C++ code in Linux ? The idea is to catch programming errors even before the code goes in to the code review state. It would be great to have the possibility to add rules the tool. Does anybody know of such tool?

  • koan
    koan almost 9 years
    Check out clang -Weverything but be aware that there will be a lot of false positives