aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2012-02-28 20:07:52 +0000
committerDean Camera <dean@fourwalledcubicle.com>2012-02-28 20:07:52 +0000
commitb762780343dd505f7bfe5673cbcffb0b938d7064 (patch)
tree1b4db7396aaa0cdbd6af8ff8770defa2162c86ff
parentf5c155cf057d286b435f4dbf0cba98fc37dd87b7 (diff)
downloadlufa-b762780343dd505f7bfe5673cbcffb0b938d7064.tar.gz
lufa-b762780343dd505f7bfe5673cbcffb0b938d7064.tar.bz2
lufa-b762780343dd505f7bfe5673cbcffb0b938d7064.zip
Add source static analysis build test using "cppcheck".
-rw-r--r--BuildTests/StaticAnalysisTest/makefile23
-rw-r--r--BuildTests/makefile3
2 files changed, 25 insertions, 1 deletions
diff --git a/BuildTests/StaticAnalysisTest/makefile b/BuildTests/StaticAnalysisTest/makefile
new file mode 100644
index 000000000..1556bbd90
--- /dev/null
+++ b/BuildTests/StaticAnalysisTest/makefile
@@ -0,0 +1,23 @@
+#
+# LUFA Library
+# Copyright (C) Dean Camera, 2011.
+#
+# dean [at] fourwalledcubicle [dot] com
+# www.lufa-lib.org
+#
+
+# 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 = ../../
+
+# Filenames or directories (including fragments) to exclude from the analysis
+EXCLUDE_LIST = HostLoaderApp/ FATFs/ PetiteFATFs/ uip/
+
+# Output message template for found warnings and errors
+MESSAGE_TEMPLATE = "{file}({line}): {severity} ({id}): {message}"
+
+all:
+ cppcheck -q -f --error-exitcode=1 --template $(MESSAGE_TEMPLATE) --enable=style --suppress=variableScope $(EXCLUDE_LIST:%=-i%) $(LUFA_ROOT_PATH)
+
+%: \ No newline at end of file
diff --git a/BuildTests/makefile b/BuildTests/makefile
index 26b29ed9b..e29643613 100644
--- a/BuildTests/makefile
+++ b/BuildTests/makefile
@@ -13,8 +13,9 @@
all:
$(MAKE) -C ModuleTest all
$(MAKE) -C SingleUSBModeTest all
+ $(MAKE) -C StaticAnalysisTest all
%:
$(MAKE) -C ModuleTest $@
$(MAKE) -C SingleUSBModeTest $@
-
+ $(MAKE) -C StaticAnalysisTest $@