X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/7416ebd7c6591c95a0ae79be8ed10203714d385d..fde181a8302ad05e40fca5df03a62e64fb10f9e4:/BuildTests/StaticAnalysisTest/makefile diff --git a/BuildTests/StaticAnalysisTest/makefile b/BuildTests/StaticAnalysisTest/makefile index 44c7d5f82..817727ea3 100644 --- a/BuildTests/StaticAnalysisTest/makefile +++ b/BuildTests/StaticAnalysisTest/makefile @@ -9,19 +9,40 @@ # 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}" # Checks to suppress so that generated warnings are discarded -SUPPRESS_WARNINGS = variableScope unusedFunction missingInclude +SUPPRESS_WARNINGS = variableScope \ + missingInclude -all: - cppcheck -q --std=c99 --check-config $(EXCLUDE_LIST:%=-i%) $(LUFA_ROOT_PATH) - cppcheck -q -f --std=c99 --error-exitcode=1 --inline-suppr --enable=all $(SUPPRESS_WARNINGS:%=--suppress=%) --template $(MESSAGE_TEMPLATE) $(EXCLUDE_LIST:%=-i%) $(LUFA_ROOT_PATH) - -%: \ No newline at end of file +# Extra paths to search for include files +INCLUDE_PATHS = $(LUFA_ROOT_PATH)/LUFA/CodeTemplates/ + +# Configuration options to pass to cppcheck +CPPCHECK_OPTIONS = --template=$(MESSAGE_TEMPLATE) $(INCLUDE_PATHS:%=-I%) $(EXCLUDE_LIST:%=-i%) --inline-suppr --force --error-exitcode=1 --std=c99 + + +all: begin staticcheck end + +begin: + @echo Executing build test "StaticAnalysisTest". + @echo + +end: + @echo Build test "StaticAnalysisTest" complete. + @echo + +staticcheck: + cppcheck --quiet $(CPPCHECK_OPTIONS) --check-config $(LUFA_ROOT_PATH) + cppcheck --quiet $(CPPCHECK_OPTIONS) --enable=all $(SUPPRESS_WARNINGS:%=--suppress=%) $(LUFA_ROOT_PATH) + +%: + \ No newline at end of file