The CPPCHECK programming utility LUFA build system module, providing targets to statically analyze C and C++ source code for errors and performance/style issues.
To use this module in your application makefile, add the following code:
include $(LUFA_PATH)/Build/lufa_cppcheck.mk
Requirements
This module requires the cppcheck
utility to be available in your system's PATH variable. The cppcheck
utility is distributed through the project's home page (http://cppcheck.sourceforge.net) for Windows, and can be installed on *nix systems via the project's source code or through the package manager.
Targets
cppcheck | Statically analyze the project source code for issues. |
cppcheck-config | Check the cppcheck configuration - scan source code and warn about missing header files and other issues. |
Mandatory Parameters
SRC | List of source files to statically analyze. |
Optional Parameters
CPPCHECK_INCLUDES | Path of extra directories to check when attemting to resolve C/C++ header file includes. |
CPPCHECK_EXCLUDES | Paths or path fragments to exclude when analyzing. |
CPPCHECK_MSG_TEMPLATE | Output message template to use when printing errors, warnings and information (see cppcheck documentation). |
CPPCHECK_ENABLE | Analysis rule categories to enable (see cppcheck documentation). |
CPPCHECK_SUPPRESS | Specific analysis rules to suppress (see cppcheck documentation). |
CPPCHECK_FAIL_ON_WARNING | Set to Y to fail the analysis job with an error exit code if warnings are found, N to continue without failing. |
CPPCHECK_QUIET | Set to Y to suppress all output except warnings and errors, N to show verbose output information. |
CPPCHECK_FLAGS | Extra flags to pass to cppcheck , after the automatically generated flags. |
Module Provided Variables
Module Provided Macros