From 4349e53203d1423d27320cd34b903c43a1dffcbc Mon Sep 17 00:00:00 2001 From: Steve Karg Date: Fri, 21 May 2021 09:00:57 -0500 Subject: [PATCH] Added cppcheck of BACnet source into pipeline (#171) Co-authored-by: Steve Karg --- .travis.yml | 5 +++++ Makefile | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/.travis.yml b/.travis.yml index 31ce347e..61122ec9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,7 @@ before_install: - sudo apt-get install -qq gcc-avr avr-libc binutils-avr - sudo apt-get install -qq mingw-w64 - sudo apt-get install -qq libconfig-dev + - sudo apt-get install -qq cppcheck compiler: - gcc @@ -61,6 +62,10 @@ jobs: os: linux compiler: clang script: make clean lint + - stage: cppcheck + os: linux + compiler: gcc + script: make clean cppcheck - stage: ports-arm os: linux before_script: diff --git a/Makefile b/Makefile index b0f716ae..777c5771 100644 --- a/Makefile +++ b/Makefile @@ -181,6 +181,14 @@ tidy: lint: scan-build --status-bugs -analyze-headers make -j2 clean server +CPPCHECK_OPTIONS = --enable=warning,portability +CPPCHECK_OPTIONS += --template=gcc +CPPCHECK_OPTIONS += --suppress=selfAssignment + +.PHONY: cppcheck +cppcheck: + cppcheck $(CPPCHECK_OPTIONS) --quiet --force ./src/ + .PHONY: clean clean: $(MAKE) -s -C src clean