Differences between revisions 6 and 9 (spanning 3 versions)
Revision 6 as of 2016-05-19 03:29:28
Size: 736
Editor: SamatJain
Comment:
Revision 9 as of 2016-05-28 19:28:45
Size: 1557
Editor: SamatJain
Comment:
Deletions are marked like this. Additions are marked like this.
Line 20: Line 20:
 * Qt's [[https://wiki.qt.io/Qt_Coding_Style|Coding Style]] and [[https://wiki.qt.io/Coding_Conventions|Coding Conventions]]

== Static analysis tools ==

 * [[http://clang-analyzer.llvm.org/|Clang Static Analyzer]]: sets CC and CXX to use alternate compiler to do analysis
 * [[http://cppcheck.sourceforge.net/|Cppcheck]]; [[https://github.com/danmar/cppcheck/|github:danmar/cppcheck]]

{{{#!highlight sh numbers=off
# Highest severity
cppcheck --enable=all *.cpp
# Everything except style-related linting
cppcheck --enable=warning,performance,portability,information,missingInclude \
         --std=c++11 --library=std.cfg --verbose --quiet \
         *.cpp
}}}

Overview articles:

 * [[https://arcanis.me/en/2015/10/17/cppcheck-and-clang-format/|Add cppcheck and clang-format for a cmake project]]

Clang-Tidy — Extra Clang Tools 3.9 documentation

Use:

clang-tidy -checks='*' main.cpp -- -std=c++11

ClangFormat: auto-formats C++ code

C++ style guides

Static analysis tools

# Highest severity
cppcheck --enable=all *.cpp
# Everything except style-related linting
cppcheck --enable=warning,performance,portability,information,missingInclude \
         --std=c++11 --library=std.cfg --verbose --quiet \
         *.cpp

Overview articles:

SamatsWiki: CodingStyle/C++ (last edited 2020-09-02 20:49:51 by SamatJain)