X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/bb85d083a7899890d0c14502078f6fa60a09d5df..8f4f48d963d0dd5751298a3a301dcbb32e26082b:/BuildTests/StaticAnalysisTest/makefile?ds=inline diff --git a/BuildTests/StaticAnalysisTest/makefile b/BuildTests/StaticAnalysisTest/makefile index 766bf080c..b065a9032 100644 --- a/BuildTests/StaticAnalysisTest/makefile +++ b/BuildTests/StaticAnalysisTest/makefile @@ -9,15 +9,37 @@ # Static anlysis of the entire LUFA source tree, using the free cross-platform "cppcheck" tool. # Path to the root of the LUFA tree to scan -LUFA_ROOT_PATH = ../../ +LUFA_ROOT_PATH = ../.. # Filenames or directories (including fragments) to exclude from the analysis -EXCLUDE_LIST = HostLoaderApp/ FATFs/ PetiteFATFs/ uip/ +EXCLUDE_LIST = FATFs/ \ + PetiteFATFs/ \ + uip/ # Output message template for found warnings and errors -MESSAGE_TEMPLATE = "{file}({line}): {severity} ({id}): {message}" +MESSAGE_TEMPLATE = "{file}:{line}: {severity} ({id}): {message}" -all: - cppcheck -q -f --error-exitcode=1 --inline-suppr --enable=style --suppress=variableScope --template $(MESSAGE_TEMPLATE) $(EXCLUDE_LIST:%=-i%) $(LUFA_ROOT_PATH) - -%: \ No newline at end of file +# Checks to suppress so that generated warnings are discarded +SUPPRESS_WARNINGS = variableScope \ + missingInclude + +# Extra paths to search for include files +INCLUDE_PATHS = $(LUFA_ROOT_PATH)/LUFA/CodeTemplates/ + + +all: begin staticcheck end + +begin: + @echo Executing build test "StaticAnalysisTest". + @echo + +end: + @echo Build test "StaticAnalysisTest" complete. + @echo + +staticcheck: + cppcheck --quiet --template=$(MESSAGE_TEMPLATE) $(INCLUDE_PATHS:%=-I%) $(EXCLUDE_LIST:%=-i%) --inline-suppr --force --check-config $(LUFA_ROOT_PATH) + cppcheck --quiet --template=$(MESSAGE_TEMPLATE) $(INCLUDE_PATHS:%=-I%) $(EXCLUDE_LIST:%=-i%) --inline-suppr --force --error-exitcode=1 --std=c99 --enable=all $(SUPPRESS_WARNINGS:%=--suppress=%) --inconclusive $(LUFA_ROOT_PATH) + +%: + \ No newline at end of file