-
-
Save blockspacer/4c50a439844387dc936d806f1e7a7168 to your computer and use it in GitHub Desktop.
Using oclint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Things that can catch OCLINT * | |
http://oclint-docs.readthedocs.io/en/stable/rules/index.html | |
*How to install it:* | |
$ brew tap oclint/formulae | |
$ brew install oclint | |
*How to run it:* | |
1. Run CMAKE export command (export compiler properties per file) | |
$ cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON | |
=> a file compile_commands.json is created, | |
Copy it to the main source directory (path where you ran cmake on) | |
2. Run oclint | |
$ cd YOUR_SOURCE_PATH | |
$ oclint-json-compilation-database | |
The report appears in the shell | |
You can build more complex output | |
$ oclint-json-compilation-database -enable-clang-static-analyzer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment