Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Static Code Analyzer for C++ in Linux [duplicate]

Tags:

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?

like image 250
Ajay Avatar asked Nov 09 '11 09:11

Ajay


People also ask

Which of the following is a type of C or C static code analysis tool?

Helix QAC is an excellent static analysis testing tool for C and C++ code from Perforce (formerly PRQA). The tool comes with a single installer and supports platforms like Windows 7, Linex Rhel 5 and Solaris 10.

What is static code analysis in C?

Static analysis is a method of debugging that is done by automatically examining the source code without having to execute the program. This provides developers with an understanding of their code base and helps ensure that it is compliant, safe, and secure.

What is the most popular static code analysis tool?

SonarQube. SonarQube is the popular static analysis tool for continuously inspecting the code quality and security of your codebases and guiding development teams during code reviews. SonarQube is used for automated code review with CI/CD Integration.

Is valgrind a static analysis tool?

Static analyses are distinct from dynamic analyses such as valgrind, which extract facts from a program as it runs, and model checking, which verifies the correctness of a separate external specification of a program.


2 Answers

  • lint, found here: http://en.wikipedia.org/wiki/Lint_(software)
  • cppcheck, found here: http://cppcheck.wiki.sourceforge.net/
like image 118
LisztLi Avatar answered Sep 27 '22 03:09

LisztLi


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.

like image 21
fghj Avatar answered Sep 27 '22 03:09

fghj