Skip to content

Static Code Analysis

Gökhan Şimşek edited this page Dec 30, 2020 · 19 revisions

To run static code analysis, go to bin directory. And execute one of the following scripts:
(Runs in release mode by default, add debug when needed & supported)

|-- Run Static Code Analysis:
|
|     $ bin/run-clang-tidy
|     $ bin/run-scan-build
|     $ bin/run-cppcheck
|     $ bin/run-vs-code-analysis (Windows only)
|__________________________________________________________________

E.g.:

// macOS, Linux
\robo\bin>run-clang-tidy
....


// Windows 
\robo\bin>run-cppcheck.bat

---------------------- Running cppcheck ----------------------
Checking ..\src\robomongo\app\main.cpp ...
Checking ..\src\robomongo\app\main.cpp: Q_OS_MAC...
Checking ..\src\robomongo\app\main.cpp: Q_OS_WIN...
1/125 files checked 0% done
Checking ..\src\robomongo\app\main_mongo.cpp ...
...
---------------------- Info ----------------------
Cppcheck 2.1
Command called: cppcheck ..\src\robomongo\ --enable=all --std=c++17

---------------------- End of cppcheck ----------------------