Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use clang-check / clang-analyze #2

Open
jabbenseth opened this issue Aug 4, 2016 · 0 comments
Open

Use clang-check / clang-analyze #2

jabbenseth opened this issue Aug 4, 2016 · 0 comments

Comments

@jabbenseth
Copy link
Contributor

http://clang-analyzer.llvm.org/

harder and more rules (and some bugs leading to false positives):
http://oclint.org/

Both of them need compile_commands. They are generated with catkin_make -DCMAKE_EXPORT_COMPILE_COMMANDS=ON in /path/to/catkin_workspace/build/.

syntax for clang:
clang-check -analyze -p </path/to/catkin_workspace/build/> <file_0> <file_1> <...>

syntax for oclint is similar:
oclint -p </path/to/catkin_workspace/build/> <file_0> <file_1> <..>

A main issue with static analyzers is that they check included files as well and find issues in ros packages or libraries not maintained by us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants