Table of Contents
cppcheck C/C++ 소스코드 점검툴
라이센스
GPL v3 (GNU General Public License v3)
설치
https://cppcheck.sourceforge.io/
지원하는 OS :
- Windows 64-bit (No XP support)
- Debian
- Fedora
- Mac
실행
# 분석 (전부)
cppcheck src/ \
--output-file=report.xml \
--xml \
--xml-version=2 \
--enable=all \
--std=c++20 \
--language=c++ \
--suppress=missingIncludeSystem
# 분석 (특정 경고, error 는 제외불가)
cppcheck src/ \
--output-file=report.xml \
--xml \
--xml-version=2 \
--enable=warning,performance,portability \
--std=c++20 \
--language=c++
vi suppressions.txt
-----------------
*:src/sub/cJSON.cpp
*:src/sub/cJSON.h
-----------------
# 분석 (서드파티 라이브러리 제외)
cppcheck src/ \
--output-file=report.xml \
--xml \
--xml-version=2 \
--enable=warning,performance,portability \
--suppressions-list=suppressions.txt \
--std=c++20 \
--language=c++ \
--force
# 리포트 생성
cppcheck-htmlreport \
--file=./report.xml \
--report-dir=./report