Fix mismatched aliased event and event stub function prototypes.
[pub/USBasp.git] / LUFA / Build / DMBS / DMBS / cppcheck.md
1 DMBS - Dean's Makefile Build System
2 ===================================
3
4
5 Module: CPPCHECK
6 -----------------
7
8 The CPPCHECK module provides build targets to perform static analysis of the
9 user application, using the open source `cppcheck` tool.
10
11 ## Importing This Module into a Makefile:
12
13 To use this module in your application makefile, add the following code to your
14 makefile:
15
16 include $(DMBS_PATH)/cppcheck.mk
17
18 ## Prerequisites:
19
20 This module requires the `cppcheck` utility to be available in your system's
21 `PATH` variable. The `cppcheck` utility is distributed on the project's
22 [official site](http://cppcheck.sourceforge.net/) but is also
23 made available in many *nix operating system's package managers.
24
25 ## Build Targets:
26
27 The following targets are supported by this module:
28
29 <table>
30 <tbody>
31 <tr>
32 <td>cppcheck</td>
33 <td>Scan the project with CPPCHECK, and show all discovered issues.</td>
34 </tr>
35 <tr>
36 <td>cppcheck-config</td>
37 <td>Check the project with CPPCHECK, to find missing header paths.</td>
38 </tr>
39 </tbody>
40 </table>
41
42 ## Mandatory Variables:
43
44 The following variables must be defined (with a `NAME = VALUE` syntax, one
45 variable per line) in the user makefile to be able to use this module:
46
47 <table>
48 <tbody>
49 <tr>
50 <td>SRC</td>
51 <td>List of all project source files to scan.</td>
52 </tr>
53 </tbody>
54 </table>
55
56 ## Optional Variables:
57
58 The following variables may be defined (with a `NAME = VALUE` syntax, one
59 variable per line) in the user makefile. If not specified, a default value will
60 be assumed.
61
62 <table>
63 <tbody>
64 <tr>
65 <td>CPPCHECK_INCLUDES</td>
66 <td>Extra include paths to search, for any missing header files. Default is empty (no additional paths).</td>
67 </tr>
68 <tr>
69 <td>CPPCHECK_EXCLUDES</td>
70 <td>List of source files, file paths or path fragments to exclude from the scan. Default is empty (no exclusions).</td>
71 </tr>
72 <tr>
73 <td>CPPCHECK_MSG_TEMPLATE</td>
74 <td>Template for error and warning message output. Default is `{file}:{line}: {severity} ({id}): {message}`.</td>
75 </tr>
76 <tr>
77 <td>CPPCHECK_ENABLE</td>
78 <td>List of CPPCHECK checks to enable. Default is `all`.</td>
79 </tr>
80 <tr>
81 <td>CPPCHECK_SUPPRESS</td>
82 <td>List of CPPCHECK checks to ignore. Default is `variableScope missingInclude`.</td>
83 </tr>
84 <tr>
85 <td>CPPCHECK_FAIL_ON_WARNING</td>
86 <td>Boolean, if `Y` the build will fail if CPPCHECK discovers any errors or warnings. If `N`, fail only on errors. Default is `Y`.</td>
87 </tr>
88 <tr>
89 <td>CPPCHECK_QUIET</td>
90 <td>Boolean, if `Y` CPPCHECK will suppress all output except for discovered errors or warnings. If `N`, scan progress will be emitted. Default is `Y`.</td>
91 </tr>
92 <tr>
93 <td>CPPCHECK_FLAGS_</td>
94 <td>Additional flags to pass to CPPCHECK when scans are started. Default is empty (no additional flags).</td>
95 </tr>
96 </tbody>
97 </table>
98
99 ## Provided Variables:
100
101 The following variables may be referenced in a user makefile (via `$(NAME)`
102 syntax) if desired, as they are provided by this module.
103
104 <table>
105 <tbody>
106 <tr>
107 <td>N/A</td>
108 <td>This module provides no variables.</td>
109 </tr>
110 </tbody>
111 </table>
112
113 ## Provided Macros:
114
115 The following macros may be referenced in a user makefile (via
116 `$(call NAME, ARG1, ARG2, ...)` syntax) if desired, as they are provided by
117 this module.
118
119 <table>
120 <tbody>
121 <tr>
122 <td>N/A</td>
123 <td>This module provides no macros.</td>
124 </tr>
125 </tbody>
126 </table>
127
128 ## Module Changelog:
129
130 The changes to this module since its initial release are listed below, as of the
131 DMBS version where the change was made.
132
133 ### 20160403
134 Initial release.