bake-toolkit 2.19.0 → 2.19.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/documentation/_build/html/_sources/changelog.txt +3 -0
- data/documentation/_build/html/_sources/concepts/build_hierarchy.txt +34 -0
- data/documentation/_build/html/_sources/index.txt +1 -1
- data/documentation/_build/html/_static/basic.css +598 -598
- data/documentation/_build/html/_static/bootstrap-2.3.2/css/bootstrap-responsive.css +1109 -1109
- data/documentation/_build/html/_static/bootstrap-2.3.2/css/bootstrap-responsive.min.css +9 -9
- data/documentation/_build/html/_static/bootstrap-2.3.2/css/bootstrap.css +6167 -6167
- data/documentation/_build/html/_static/bootstrap-2.3.2/css/bootstrap.min.css +9 -9
- data/documentation/_build/html/_static/bootstrap-2.3.2/js/bootstrap.js +2287 -2287
- data/documentation/_build/html/_static/bootstrap-2.3.2/js/bootstrap.min.js +5 -5
- data/documentation/_build/html/_static/bootstrap-3.3.4/css/bootstrap-theme.css +476 -476
- data/documentation/_build/html/_static/bootstrap-3.3.4/css/bootstrap-theme.min.css +4 -4
- data/documentation/_build/html/_static/bootstrap-3.3.4/css/bootstrap.css +6584 -6584
- data/documentation/_build/html/_static/bootstrap-3.3.4/css/bootstrap.min.css +4 -4
- data/documentation/_build/html/_static/bootstrap-3.3.4/fonts/glyphicons-halflings-regular.svg +287 -287
- data/documentation/_build/html/_static/bootstrap-3.3.4/js/bootstrap.js +2317 -2317
- data/documentation/_build/html/_static/bootstrap-3.3.4/js/bootstrap.min.js +6 -6
- data/documentation/_build/html/_static/bootstrap-3.3.4/js/npm.js +12 -12
- data/documentation/_build/html/_static/bootstrap-sphinx.css +186 -186
- data/documentation/_build/html/_static/bootstrap-sphinx.js +161 -161
- data/documentation/_build/html/_static/bootswatch-2.3.2/amelia/bootstrap.min.css +9 -9
- data/documentation/_build/html/_static/bootswatch-2.3.2/cerulean/bootstrap.min.css +9 -9
- data/documentation/_build/html/_static/bootswatch-2.3.2/cosmo/bootstrap.min.css +9 -9
- data/documentation/_build/html/_static/bootswatch-2.3.2/cyborg/bootstrap.min.css +9 -9
- data/documentation/_build/html/_static/bootswatch-2.3.2/flatly/bootstrap.min.css +9 -9
- data/documentation/_build/html/_static/bootswatch-2.3.2/journal/bootstrap.min.css +9 -9
- data/documentation/_build/html/_static/bootswatch-2.3.2/readable/bootstrap.min.css +9 -9
- data/documentation/_build/html/_static/bootswatch-2.3.2/simplex/bootstrap.min.css +9 -9
- data/documentation/_build/html/_static/bootswatch-2.3.2/slate/bootstrap.min.css +9 -9
- data/documentation/_build/html/_static/bootswatch-2.3.2/spacelab/bootstrap.min.css +9 -9
- data/documentation/_build/html/_static/bootswatch-2.3.2/spruce/bootstrap.min.css +9 -9
- data/documentation/_build/html/_static/bootswatch-2.3.2/superhero/bootstrap.min.css +9 -9
- data/documentation/_build/html/_static/bootswatch-2.3.2/united/bootstrap.min.css +9 -9
- data/documentation/_build/html/_static/bootswatch-3.3.4/cerulean/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/cosmo/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/custom/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/cyborg/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/darkly/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/flatly/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/fonts/glyphicons-halflings-regular.svg +287 -287
- data/documentation/_build/html/_static/bootswatch-3.3.4/journal/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/lumen/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/paper/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/readable/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/sandstone/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/simplex/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/slate/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/spacelab/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/superhero/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/united/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/yeti/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/doctools.js +263 -263
- data/documentation/_build/html/_static/jquery-1.11.1.js +10308 -10308
- data/documentation/_build/html/_static/jquery.js +4 -4
- data/documentation/_build/html/_static/js/jquery-1.11.0.min.js +4 -4
- data/documentation/_build/html/_static/js/jquery-fix.js +1 -1
- data/documentation/_build/html/_static/searchtools.js +621 -621
- data/documentation/_build/html/_static/underscore-1.3.1.js +999 -999
- data/documentation/_build/html/_static/underscore.js +31 -31
- data/documentation/_build/html/_static/websupport.js +808 -808
- data/documentation/_build/html/changelog.html +949 -944
- data/documentation/_build/html/commandline/commandline.html +284 -284
- data/documentation/_build/html/concepts/build_hierarchy.html +205 -0
- data/documentation/_build/html/concepts/concepts.html +186 -186
- data/documentation/_build/html/concepts/link_order.html +245 -245
- data/documentation/_build/html/concepts/the_main_project.html +260 -260
- data/documentation/_build/html/concepts/the_project_meta_file.html +288 -288
- data/documentation/_build/html/genindex.html +152 -152
- data/documentation/_build/html/ide/eclipse/eclipse.html +186 -186
- data/documentation/_build/html/ide/eclipse/how_to_convert_existing_cdt_workspace.html +208 -208
- data/documentation/_build/html/ide/eclipse/how_to_create_a_new_project_in_eclipse.html +191 -191
- data/documentation/_build/html/ide/eclipse/how_to_create_a_workspace_in_eclipse.html +198 -198
- data/documentation/_build/html/ide/eclipse/how_to_debug_in_eclipse.html +198 -198
- data/documentation/_build/html/ide/eclipse/how_to_install_eclipse_plugin.html +196 -196
- data/documentation/_build/html/ide/eclipse/how_to_use_bake_in_eclipse.html +256 -256
- data/documentation/_build/html/ide/ide_integrations.html +183 -183
- data/documentation/_build/html/ide/vs/how_to_create_vs_projects.html +171 -171
- data/documentation/_build/html/ide/vs/how_to_debug_in_vs.html +185 -185
- data/documentation/_build/html/ide/vs/how_to_used_bake_in_vs.html +190 -190
- data/documentation/_build/html/ide/vs/vs.html +170 -170
- data/documentation/_build/html/ide/vs/vs_install.html +202 -202
- data/documentation/_build/html/index.html +241 -241
- data/documentation/_build/html/install/install_bake.html +279 -279
- data/documentation/_build/html/internal.html +217 -217
- data/documentation/_build/html/known_issues.html +175 -175
- data/documentation/_build/html/license.html +236 -236
- data/documentation/_build/html/performance/performance.html +373 -373
- data/documentation/_build/html/quickstart/quickstart.html +236 -236
- data/documentation/_build/html/search.html +174 -174
- data/documentation/_build/html/searchindex.js +1 -1
- data/documentation/_build/html/syntax/adapt_configs.html +286 -286
- data/documentation/_build/html/syntax/derive_configs.html +247 -247
- data/documentation/_build/html/syntax/project_meta_syntax.html +893 -893
- data/documentation/_build/html/syntax/syntax.html +189 -189
- data/documentation/_build/html/syntax/variable_substitutions.html +378 -378
- data/documentation/_build/html/tips_and_tricks/bundle.html +180 -180
- data/documentation/_build/html/tips_and_tricks/how_to_use_bake_with_cygwin.html +214 -214
- data/documentation/_build/html/tips_and_tricks/static_code_analysis.html +284 -284
- data/documentation/_build/html/tips_and_tricks/the_bakery.html +405 -405
- data/documentation/_build/html/tips_and_tricks/the_clang.html +201 -201
- data/documentation/_build/html/tips_and_tricks/tips_and_tricks.html +197 -197
- data/documentation/_build/html/why_bake/why_bake.html +241 -241
- data/lib/blocks/block.rb +9 -4
- data/lib/common/version.rb +1 -1
- metadata +4 -2
@@ -1,285 +1,285 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
|
4
|
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
5
|
-
<head>
|
6
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
7
|
-
|
8
|
-
<title>Static Code Analysis — bake 2.19.
|
9
|
-
|
10
|
-
<link rel="stylesheet" href="../_static/basic.css" type="text/css" />
|
11
|
-
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
12
|
-
<link rel="stylesheet" href="../_static/bootswatch-3.3.4/sandstone/bootstrap.min.css" type="text/css" />
|
13
|
-
<link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
|
14
|
-
|
15
|
-
<script type="text/javascript">
|
16
|
-
var DOCUMENTATION_OPTIONS = {
|
17
|
-
URL_ROOT: '../',
|
18
|
-
VERSION: '2.19.
|
19
|
-
COLLAPSE_INDEX: false,
|
20
|
-
FILE_SUFFIX: '.html',
|
21
|
-
HAS_SOURCE: true
|
22
|
-
};
|
23
|
-
</script>
|
24
|
-
<script type="text/javascript" src="../_static/jquery.js"></script>
|
25
|
-
<script type="text/javascript" src="../_static/underscore.js"></script>
|
26
|
-
<script type="text/javascript" src="../_static/doctools.js"></script>
|
27
|
-
<script type="text/javascript" src="../_static/js/jquery-1.11.0.min.js"></script>
|
28
|
-
<script type="text/javascript" src="../_static/js/jquery-fix.js"></script>
|
29
|
-
<script type="text/javascript" src="../_static/bootstrap-3.3.4/js/bootstrap.min.js"></script>
|
30
|
-
<script type="text/javascript" src="../_static/bootstrap-sphinx.js"></script>
|
31
|
-
<link rel="shortcut icon" href="../_static/logo_tiny_32.ico"/>
|
32
|
-
<link rel="top" title="bake 2.19.
|
33
|
-
<link rel="up" title="Tips and Tricks" href="tips_and_tricks.html" />
|
34
|
-
<link rel="next" title="How to use bake with cygwin" href="how_to_use_bake_with_cygwin.html" />
|
35
|
-
<link rel="prev" title="The Bakery" href="the_bakery.html" />
|
36
|
-
<meta charset='utf-8'>
|
37
|
-
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
|
38
|
-
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
|
39
|
-
<meta name="apple-mobile-web-app-capable" content="yes">
|
40
|
-
|
41
|
-
</head>
|
42
|
-
<body role="document">
|
43
|
-
|
44
|
-
<div id="navbar" class="navbar navbar-default navbar-fixed-top">
|
45
|
-
<div class="container">
|
46
|
-
<div class="navbar-header">
|
47
|
-
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
|
48
|
-
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
|
49
|
-
<span class="icon-bar"></span>
|
50
|
-
<span class="icon-bar"></span>
|
51
|
-
<span class="icon-bar"></span>
|
52
|
-
</button>
|
53
|
-
<a class="navbar-brand" href="../index.html"><img src="../_static/logo_conformant_48.png">
|
54
|
-
</a>
|
55
|
-
<span class="navbar-text navbar-version pull-left"><b></b></span>
|
56
|
-
</div>
|
57
|
-
|
58
|
-
<div class="collapse navbar-collapse nav-collapse">
|
59
|
-
<ul class="nav navbar-nav">
|
60
|
-
|
61
|
-
|
62
|
-
<li class="dropdown globaltoc-container">
|
63
|
-
<a role="button"
|
64
|
-
id="dLabelGlobalToc"
|
65
|
-
data-toggle="dropdown"
|
66
|
-
data-target="#"
|
67
|
-
href="../index.html">Section <b class="caret"></b></a>
|
68
|
-
<ul class="dropdown-menu globaltoc"
|
69
|
-
role="menu"
|
70
|
-
aria-labelledby="dLabelGlobalToc"><ul class="current">
|
71
|
-
<li class="toctree-l1"><a class="reference internal" href="../why_bake/why_bake.html">Why you should use bake</a></li>
|
72
|
-
<li class="toctree-l1"><a class="reference internal" href="../install/install_bake.html">Install bake</a></li>
|
73
|
-
<li class="toctree-l1"><a class="reference internal" href="../quickstart/quickstart.html">Quickstart</a></li>
|
74
|
-
<li class="toctree-l1"><a class="reference internal" href="../concepts/concepts.html">Concepts</a></li>
|
75
|
-
<li class="toctree-l1"><a class="reference internal" href="../syntax/syntax.html">Syntax</a></li>
|
76
|
-
<li class="toctree-l1"><a class="reference internal" href="../commandline/commandline.html">Commandline</a></li>
|
77
|
-
<li class="toctree-l1"><a class="reference internal" href="../ide/ide_integrations.html">IDE Support</a></li>
|
78
|
-
<li class="toctree-l1 current"><a class="reference internal" href="tips_and_tricks.html">Tips and Tricks</a></li>
|
79
|
-
<li class="toctree-l1"><a class="reference internal" href="../performance/performance.html">Performance</a></li>
|
80
|
-
<li class="toctree-l1"><a class="reference internal" href="../known_issues.html">Known Issues</a></li>
|
81
|
-
<li class="toctree-l1"><a class="reference internal" href="../changelog.html">Changelog</a></li>
|
82
|
-
<li class="toctree-l1"><a class="reference internal" href="../license.html">License</a></li>
|
83
|
-
</ul>
|
84
|
-
<ul>
|
85
|
-
<li class="toctree-l1"><a class="reference internal" href="../internal.html">Internal developing notes</a></li>
|
86
|
-
</ul>
|
87
|
-
</ul>
|
88
|
-
</li>
|
89
|
-
|
90
|
-
<li class="dropdown">
|
91
|
-
<a role="button"
|
92
|
-
id="dLabelLocalToc"
|
93
|
-
data-toggle="dropdown"
|
94
|
-
data-target="#"
|
95
|
-
href="#">SubSections <b class="caret"></b></a>
|
96
|
-
<ul class="dropdown-menu localtoc"
|
97
|
-
role="menu"
|
98
|
-
aria-labelledby="dLabelLocalToc"><ul>
|
99
|
-
<li><a class="reference internal" href="#">Static Code Analysis</a><ul>
|
100
|
-
<li><a class="reference internal" href="#lint">Lint</a><ul>
|
101
|
-
<li><a class="reference internal" href="#basic-setup">Basic Setup</a><ul>
|
102
|
-
<li><a class="reference internal" href="#example">Example</a></li>
|
103
|
-
</ul>
|
104
|
-
</li>
|
105
|
-
<li><a class="reference internal" href="#configuring-lint">Configuring Lint</a><ul>
|
106
|
-
<li><a class="reference internal" href="#id2">Example</a></li>
|
107
|
-
</ul>
|
108
|
-
</li>
|
109
|
-
<li><a class="reference internal" href="#known-issues">Known Issues</a><ul>
|
110
|
-
<li><a class="reference internal" href="#bake-only-searches-for-lint-nt-exe">bake only searches for lint-nt.exe</a></li>
|
111
|
-
<li><a class="reference internal" href="#lint-fails-due-to-missing-compiler-includes-and-defines">Lint fails due to missing compiler includes and defines</a></li>
|
112
|
-
<li><a class="reference internal" href="#lint-error-due-to-too-many-includes">Lint error due to too many includes</a></li>
|
113
|
-
</ul>
|
114
|
-
</li>
|
115
|
-
</ul>
|
116
|
-
</li>
|
117
|
-
</ul>
|
118
|
-
</li>
|
119
|
-
</ul>
|
120
|
-
</ul>
|
121
|
-
</li>
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
<li>
|
128
|
-
<a href="the_bakery.html" title="Previous Chapter: The Bakery"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm hidden-tablet">« The Bakery</span>
|
129
|
-
</a>
|
130
|
-
</li>
|
131
|
-
<li>
|
132
|
-
<a href="how_to_use_bake_with_cygwin.html" title="Next Chapter: How to use bake with cygwin"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm hidden-tablet">How to use ba... »</span>
|
133
|
-
</a>
|
134
|
-
</li>
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
</ul>
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
<form class="navbar-form navbar-right" action="../search.html" method="get">
|
145
|
-
<div class="form-group">
|
146
|
-
<input type="text" name="q" class="form-control" placeholder="Search" />
|
147
|
-
</div>
|
148
|
-
<input type="hidden" name="check_keywords" value="yes" />
|
149
|
-
<input type="hidden" name="area" value="default" />
|
150
|
-
</form>
|
151
|
-
|
152
|
-
</div>
|
153
|
-
</div>
|
154
|
-
</div>
|
155
|
-
|
156
|
-
<div class="container">
|
157
|
-
<div class="row">
|
158
|
-
<div class="col-md-12">
|
159
|
-
|
160
|
-
<div class="section" id="static-code-analysis">
|
161
|
-
<h1>Static Code Analysis<a class="headerlink" href="#static-code-analysis" title="Permalink to this headline">¶</a></h1>
|
162
|
-
<p>Static code analysis often is part or a pre step of the build, even though bake provides presteps which can be used to
|
163
|
-
add customized steps, we choose to add explicit support for static code analysis due to the fact that the analysis often
|
164
|
-
depends on information well known by the build system (include pahts, compiler flags, etc.). Currently bake has built in
|
165
|
-
support for <em>Pc-Lint</em>.</p>
|
166
|
-
<div class="section" id="lint">
|
167
|
-
<h2>Lint<a class="headerlink" href="#lint" title="Permalink to this headline">¶</a></h2>
|
168
|
-
<p>With bake you can lint LibraryConfigs, ExecutableConfigs, single files and the complete workspace (in this case the projects are linted separately).
|
169
|
-
The CPP Toolchain settings of the project are used regardless of the file type and file specific options.
|
170
|
-
It is possible to specify lnt-files with LintPolicy, but you can add every other lint command line option as well.</p>
|
171
|
-
<div class="section" id="basic-setup">
|
172
|
-
<h3>Basic Setup<a class="headerlink" href="#basic-setup" title="Permalink to this headline">¶</a></h3>
|
173
|
-
<ol class="arabic simple">
|
174
|
-
<li>Install <a class="reference external" href="http://www.gimpel.com/html/products.htm">lint</a>.</li>
|
175
|
-
<li>Make sure the The lint executable ‘lint-nt.exe’ is in the path.</li>
|
176
|
-
</ol>
|
177
|
-
<div class="admonition attention">
|
178
|
-
<p class="first admonition-title">Attention</p>
|
179
|
-
<p class="last">even though there is a unix version of pc-lint the asscoated binary name must be lint-nt.exe otherwise
|
180
|
-
it won’t be recorgnized by the bake build system.</p>
|
181
|
-
</div>
|
182
|
-
<p>After doing this steps you are able to lint your build configurations (LibraryConfigs and ExecutableConfigs) using the <em>–lint</em> flag on the command line.</p>
|
183
|
-
<div class="section" id="example">
|
184
|
-
<h4>Example<a class="headerlink" href="#example" title="Permalink to this headline">¶</a></h4>
|
185
|
-
<div class="highlight-console"><div class="highlight"><pre><span class="gp">User@Host:~$</span> bake Debug -p MyLibraryProject --lint
|
186
|
-
</pre></div>
|
187
|
-
</div>
|
188
|
-
</div>
|
189
|
-
</div>
|
190
|
-
<div class="section" id="configuring-lint">
|
191
|
-
<h3>Configuring Lint<a class="headerlink" href="#configuring-lint" title="Permalink to this headline">¶</a></h3>
|
192
|
-
<p>In order to configure lint in the Project.meta file, just use the <em>LintPolicy</em> command, which forwards the supplied
|
193
|
-
the parameters to lint.</p>
|
194
|
-
<div class="highlight-text"><div class="highlight"><pre>DefaultToolchain GCC {
|
195
|
-
...
|
196
|
-
LintPolicy "$(ProjectDir)/lint/misra.lnt"
|
197
|
-
LintPolicy "$(ProjectDir)/lint/suppressions.lnt"
|
198
|
-
}
|
199
|
-
</pre></div>
|
200
|
-
</div>
|
201
|
-
<div class="section" id="id2">
|
202
|
-
<h4>Example<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h4>
|
203
|
-
<p>This example shows how to redirect the output to single xml files placed into the main project folder.</p>
|
204
|
-
<div class="highlight-text"><div class="highlight"><pre>DefaultToolchain GCC {
|
205
|
-
LintPolicy "-os($(MainProjectDir)/$(ProjectName)_$(ConfigName)_lintout.xml)"
|
206
|
-
LintPolicy "-v"
|
207
|
-
LintPolicy "+xml(doc)"
|
208
|
-
LintPolicy "-format=%f %l %t %n %m"
|
209
|
-
LintPolicy "-format_specific= "
|
210
|
-
LintPolicy "-pragma(message)"
|
211
|
-
...
|
212
|
-
}
|
213
|
-
</pre></div>
|
214
|
-
</div>
|
215
|
-
</div>
|
216
|
-
</div>
|
217
|
-
<div class="section" id="known-issues">
|
218
|
-
<h3>Known Issues<a class="headerlink" href="#known-issues" title="Permalink to this headline">¶</a></h3>
|
219
|
-
<div class="section" id="bake-only-searches-for-lint-nt-exe">
|
220
|
-
<h4>bake only searches for lint-nt.exe<a class="headerlink" href="#bake-only-searches-for-lint-nt-exe" title="Permalink to this headline">¶</a></h4>
|
221
|
-
<blockquote>
|
222
|
-
<div><p><strong>Issue:</strong>
|
223
|
-
bake currently does not search for all possible names of the lint application, it only searches for a file called <em>lint-nt.exe</em>.</p>
|
224
|
-
<p><strong>Solution:</strong>
|
225
|
-
If you have another lint command (e.g. because you are using flexe lint on unix)
|
226
|
-
just create an symlink/alias which is called <em>lint-nt.exe</em>.</p>
|
227
|
-
</div></blockquote>
|
228
|
-
</div>
|
229
|
-
<div class="section" id="lint-fails-due-to-missing-compiler-includes-and-defines">
|
230
|
-
<h4>Lint fails due to missing compiler includes and defines<a class="headerlink" href="#lint-fails-due-to-missing-compiler-includes-and-defines" title="Permalink to this headline">¶</a></h4>
|
231
|
-
<blockquote>
|
232
|
-
<div><p><strong>Issue:</strong>
|
233
|
-
Lint will fail if compiler internal includes and defines are missing.</p>
|
234
|
-
<p><strong>Solution:</strong></p>
|
235
|
-
<p>Lint comes with some helper files, handle this issue. In order to get a list of all needed
|
236
|
-
helper files e.g. for GCC, use the following command.</p>
|
237
|
-
<div class="highlight-console"><div class="highlight"><pre><span class="gp">User@Host:~$</span> make -f .../PcLint/../lnt/co-gcc.mak
|
238
|
-
</pre></div>
|
239
|
-
</div>
|
240
|
-
<p>You will get a output like this:</p>
|
241
|
-
<div class="highlight-text"><div class="highlight"><pre>gcc-include-path.lnt, lint_cmac.h, lint_cppmac.h and size-options.lnt.
|
242
|
-
</pre></div>
|
243
|
-
</div>
|
244
|
-
<p>You can now add the needed includes and LintPolicies (.lnt files) to your bake
|
245
|
-
configuration.</p>
|
246
|
-
</div></blockquote>
|
247
|
-
</div>
|
248
|
-
<div class="section" id="lint-error-due-to-too-many-includes">
|
249
|
-
<h4>Lint error due to too many includes<a class="headerlink" href="#lint-error-due-to-too-many-includes" title="Permalink to this headline">¶</a></h4>
|
250
|
-
<blockquote>
|
251
|
-
<div><p><strong>Issue:</strong>
|
252
|
-
In rare cases lint has problems if it has to open too many (include) files.</p>
|
253
|
-
<p><strong>Solution:</strong>
|
254
|
-
You can use the <em>–lint-max</em> and the <em>–lint-min</em> options to get around this issue.</p>
|
255
|
-
<p>Example:</p>
|
256
|
-
<div class="highlight-console"><div class="highlight"><pre><span class="gp">User@Host:~$</span> bake Debug -p MyLibraryProject --lint --lint-max <span class="m">50</span> <span class="c">#(lints the first 51 files)</span>
|
257
|
-
<span class="gp">User@Host:~$</span> bake Debug -p MyLibraryProject --lint --lint-min <span class="m">51</span> --lint-max <span class="m">100</span> <span class="c">#(lints the next 50 files)</span>
|
258
|
-
<span class="gp">User@Host:~$</span> bake Debug -p MyLibraryProject --lint --lint-min <span class="m">101</span> <span class="c">#(lints the rest of the files)</span>
|
259
|
-
</pre></div>
|
260
|
-
</div>
|
261
|
-
</div></blockquote>
|
262
|
-
</div>
|
263
|
-
</div>
|
264
|
-
</div>
|
265
|
-
</div>
|
266
|
-
|
267
|
-
|
268
|
-
</div>
|
269
|
-
|
270
|
-
</div>
|
271
|
-
</div>
|
272
|
-
<footer class="footer">
|
273
|
-
<div class="container">
|
274
|
-
<p class="pull-right">
|
275
|
-
<a href="#">Back to top</a>
|
276
|
-
|
277
|
-
</p>
|
278
|
-
<p>
|
279
|
-
© Copyright 2016, E.S.R.Labs AG.<br/>
|
280
|
-
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3.1.<br/>
|
281
|
-
</p>
|
282
|
-
</div>
|
283
|
-
</footer>
|
284
|
-
</body>
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
5
|
+
<head>
|
6
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
7
|
+
|
8
|
+
<title>Static Code Analysis — bake 2.19.1 documentation</title>
|
9
|
+
|
10
|
+
<link rel="stylesheet" href="../_static/basic.css" type="text/css" />
|
11
|
+
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
12
|
+
<link rel="stylesheet" href="../_static/bootswatch-3.3.4/sandstone/bootstrap.min.css" type="text/css" />
|
13
|
+
<link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
|
14
|
+
|
15
|
+
<script type="text/javascript">
|
16
|
+
var DOCUMENTATION_OPTIONS = {
|
17
|
+
URL_ROOT: '../',
|
18
|
+
VERSION: '2.19.1',
|
19
|
+
COLLAPSE_INDEX: false,
|
20
|
+
FILE_SUFFIX: '.html',
|
21
|
+
HAS_SOURCE: true
|
22
|
+
};
|
23
|
+
</script>
|
24
|
+
<script type="text/javascript" src="../_static/jquery.js"></script>
|
25
|
+
<script type="text/javascript" src="../_static/underscore.js"></script>
|
26
|
+
<script type="text/javascript" src="../_static/doctools.js"></script>
|
27
|
+
<script type="text/javascript" src="../_static/js/jquery-1.11.0.min.js"></script>
|
28
|
+
<script type="text/javascript" src="../_static/js/jquery-fix.js"></script>
|
29
|
+
<script type="text/javascript" src="../_static/bootstrap-3.3.4/js/bootstrap.min.js"></script>
|
30
|
+
<script type="text/javascript" src="../_static/bootstrap-sphinx.js"></script>
|
31
|
+
<link rel="shortcut icon" href="../_static/logo_tiny_32.ico"/>
|
32
|
+
<link rel="top" title="bake 2.19.1 documentation" href="../index.html" />
|
33
|
+
<link rel="up" title="Tips and Tricks" href="tips_and_tricks.html" />
|
34
|
+
<link rel="next" title="How to use bake with cygwin" href="how_to_use_bake_with_cygwin.html" />
|
35
|
+
<link rel="prev" title="The Bakery" href="the_bakery.html" />
|
36
|
+
<meta charset='utf-8'>
|
37
|
+
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
|
38
|
+
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
|
39
|
+
<meta name="apple-mobile-web-app-capable" content="yes">
|
40
|
+
|
41
|
+
</head>
|
42
|
+
<body role="document">
|
43
|
+
|
44
|
+
<div id="navbar" class="navbar navbar-default navbar-fixed-top">
|
45
|
+
<div class="container">
|
46
|
+
<div class="navbar-header">
|
47
|
+
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
|
48
|
+
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
|
49
|
+
<span class="icon-bar"></span>
|
50
|
+
<span class="icon-bar"></span>
|
51
|
+
<span class="icon-bar"></span>
|
52
|
+
</button>
|
53
|
+
<a class="navbar-brand" href="../index.html"><img src="../_static/logo_conformant_48.png">
|
54
|
+
</a>
|
55
|
+
<span class="navbar-text navbar-version pull-left"><b></b></span>
|
56
|
+
</div>
|
57
|
+
|
58
|
+
<div class="collapse navbar-collapse nav-collapse">
|
59
|
+
<ul class="nav navbar-nav">
|
60
|
+
|
61
|
+
|
62
|
+
<li class="dropdown globaltoc-container">
|
63
|
+
<a role="button"
|
64
|
+
id="dLabelGlobalToc"
|
65
|
+
data-toggle="dropdown"
|
66
|
+
data-target="#"
|
67
|
+
href="../index.html">Section <b class="caret"></b></a>
|
68
|
+
<ul class="dropdown-menu globaltoc"
|
69
|
+
role="menu"
|
70
|
+
aria-labelledby="dLabelGlobalToc"><ul class="current">
|
71
|
+
<li class="toctree-l1"><a class="reference internal" href="../why_bake/why_bake.html">Why you should use bake</a></li>
|
72
|
+
<li class="toctree-l1"><a class="reference internal" href="../install/install_bake.html">Install bake</a></li>
|
73
|
+
<li class="toctree-l1"><a class="reference internal" href="../quickstart/quickstart.html">Quickstart</a></li>
|
74
|
+
<li class="toctree-l1"><a class="reference internal" href="../concepts/concepts.html">Concepts</a></li>
|
75
|
+
<li class="toctree-l1"><a class="reference internal" href="../syntax/syntax.html">Syntax</a></li>
|
76
|
+
<li class="toctree-l1"><a class="reference internal" href="../commandline/commandline.html">Commandline</a></li>
|
77
|
+
<li class="toctree-l1"><a class="reference internal" href="../ide/ide_integrations.html">IDE Support</a></li>
|
78
|
+
<li class="toctree-l1 current"><a class="reference internal" href="tips_and_tricks.html">Tips and Tricks</a></li>
|
79
|
+
<li class="toctree-l1"><a class="reference internal" href="../performance/performance.html">Performance</a></li>
|
80
|
+
<li class="toctree-l1"><a class="reference internal" href="../known_issues.html">Known Issues</a></li>
|
81
|
+
<li class="toctree-l1"><a class="reference internal" href="../changelog.html">Changelog</a></li>
|
82
|
+
<li class="toctree-l1"><a class="reference internal" href="../license.html">License</a></li>
|
83
|
+
</ul>
|
84
|
+
<ul>
|
85
|
+
<li class="toctree-l1"><a class="reference internal" href="../internal.html">Internal developing notes</a></li>
|
86
|
+
</ul>
|
87
|
+
</ul>
|
88
|
+
</li>
|
89
|
+
|
90
|
+
<li class="dropdown">
|
91
|
+
<a role="button"
|
92
|
+
id="dLabelLocalToc"
|
93
|
+
data-toggle="dropdown"
|
94
|
+
data-target="#"
|
95
|
+
href="#">SubSections <b class="caret"></b></a>
|
96
|
+
<ul class="dropdown-menu localtoc"
|
97
|
+
role="menu"
|
98
|
+
aria-labelledby="dLabelLocalToc"><ul>
|
99
|
+
<li><a class="reference internal" href="#">Static Code Analysis</a><ul>
|
100
|
+
<li><a class="reference internal" href="#lint">Lint</a><ul>
|
101
|
+
<li><a class="reference internal" href="#basic-setup">Basic Setup</a><ul>
|
102
|
+
<li><a class="reference internal" href="#example">Example</a></li>
|
103
|
+
</ul>
|
104
|
+
</li>
|
105
|
+
<li><a class="reference internal" href="#configuring-lint">Configuring Lint</a><ul>
|
106
|
+
<li><a class="reference internal" href="#id2">Example</a></li>
|
107
|
+
</ul>
|
108
|
+
</li>
|
109
|
+
<li><a class="reference internal" href="#known-issues">Known Issues</a><ul>
|
110
|
+
<li><a class="reference internal" href="#bake-only-searches-for-lint-nt-exe">bake only searches for lint-nt.exe</a></li>
|
111
|
+
<li><a class="reference internal" href="#lint-fails-due-to-missing-compiler-includes-and-defines">Lint fails due to missing compiler includes and defines</a></li>
|
112
|
+
<li><a class="reference internal" href="#lint-error-due-to-too-many-includes">Lint error due to too many includes</a></li>
|
113
|
+
</ul>
|
114
|
+
</li>
|
115
|
+
</ul>
|
116
|
+
</li>
|
117
|
+
</ul>
|
118
|
+
</li>
|
119
|
+
</ul>
|
120
|
+
</ul>
|
121
|
+
</li>
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
<li>
|
128
|
+
<a href="the_bakery.html" title="Previous Chapter: The Bakery"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm hidden-tablet">« The Bakery</span>
|
129
|
+
</a>
|
130
|
+
</li>
|
131
|
+
<li>
|
132
|
+
<a href="how_to_use_bake_with_cygwin.html" title="Next Chapter: How to use bake with cygwin"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm hidden-tablet">How to use ba... »</span>
|
133
|
+
</a>
|
134
|
+
</li>
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
</ul>
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
<form class="navbar-form navbar-right" action="../search.html" method="get">
|
145
|
+
<div class="form-group">
|
146
|
+
<input type="text" name="q" class="form-control" placeholder="Search" />
|
147
|
+
</div>
|
148
|
+
<input type="hidden" name="check_keywords" value="yes" />
|
149
|
+
<input type="hidden" name="area" value="default" />
|
150
|
+
</form>
|
151
|
+
|
152
|
+
</div>
|
153
|
+
</div>
|
154
|
+
</div>
|
155
|
+
|
156
|
+
<div class="container">
|
157
|
+
<div class="row">
|
158
|
+
<div class="col-md-12">
|
159
|
+
|
160
|
+
<div class="section" id="static-code-analysis">
|
161
|
+
<h1>Static Code Analysis<a class="headerlink" href="#static-code-analysis" title="Permalink to this headline">¶</a></h1>
|
162
|
+
<p>Static code analysis often is part or a pre step of the build, even though bake provides presteps which can be used to
|
163
|
+
add customized steps, we choose to add explicit support for static code analysis due to the fact that the analysis often
|
164
|
+
depends on information well known by the build system (include pahts, compiler flags, etc.). Currently bake has built in
|
165
|
+
support for <em>Pc-Lint</em>.</p>
|
166
|
+
<div class="section" id="lint">
|
167
|
+
<h2>Lint<a class="headerlink" href="#lint" title="Permalink to this headline">¶</a></h2>
|
168
|
+
<p>With bake you can lint LibraryConfigs, ExecutableConfigs, single files and the complete workspace (in this case the projects are linted separately).
|
169
|
+
The CPP Toolchain settings of the project are used regardless of the file type and file specific options.
|
170
|
+
It is possible to specify lnt-files with LintPolicy, but you can add every other lint command line option as well.</p>
|
171
|
+
<div class="section" id="basic-setup">
|
172
|
+
<h3>Basic Setup<a class="headerlink" href="#basic-setup" title="Permalink to this headline">¶</a></h3>
|
173
|
+
<ol class="arabic simple">
|
174
|
+
<li>Install <a class="reference external" href="http://www.gimpel.com/html/products.htm">lint</a>.</li>
|
175
|
+
<li>Make sure the The lint executable ‘lint-nt.exe’ is in the path.</li>
|
176
|
+
</ol>
|
177
|
+
<div class="admonition attention">
|
178
|
+
<p class="first admonition-title">Attention</p>
|
179
|
+
<p class="last">even though there is a unix version of pc-lint the asscoated binary name must be lint-nt.exe otherwise
|
180
|
+
it won’t be recorgnized by the bake build system.</p>
|
181
|
+
</div>
|
182
|
+
<p>After doing this steps you are able to lint your build configurations (LibraryConfigs and ExecutableConfigs) using the <em>–lint</em> flag on the command line.</p>
|
183
|
+
<div class="section" id="example">
|
184
|
+
<h4>Example<a class="headerlink" href="#example" title="Permalink to this headline">¶</a></h4>
|
185
|
+
<div class="highlight-console"><div class="highlight"><pre><span class="gp">User@Host:~$</span> bake Debug -p MyLibraryProject --lint
|
186
|
+
</pre></div>
|
187
|
+
</div>
|
188
|
+
</div>
|
189
|
+
</div>
|
190
|
+
<div class="section" id="configuring-lint">
|
191
|
+
<h3>Configuring Lint<a class="headerlink" href="#configuring-lint" title="Permalink to this headline">¶</a></h3>
|
192
|
+
<p>In order to configure lint in the Project.meta file, just use the <em>LintPolicy</em> command, which forwards the supplied
|
193
|
+
the parameters to lint.</p>
|
194
|
+
<div class="highlight-text"><div class="highlight"><pre>DefaultToolchain GCC {
|
195
|
+
...
|
196
|
+
LintPolicy "$(ProjectDir)/lint/misra.lnt"
|
197
|
+
LintPolicy "$(ProjectDir)/lint/suppressions.lnt"
|
198
|
+
}
|
199
|
+
</pre></div>
|
200
|
+
</div>
|
201
|
+
<div class="section" id="id2">
|
202
|
+
<h4>Example<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h4>
|
203
|
+
<p>This example shows how to redirect the output to single xml files placed into the main project folder.</p>
|
204
|
+
<div class="highlight-text"><div class="highlight"><pre>DefaultToolchain GCC {
|
205
|
+
LintPolicy "-os($(MainProjectDir)/$(ProjectName)_$(ConfigName)_lintout.xml)"
|
206
|
+
LintPolicy "-v"
|
207
|
+
LintPolicy "+xml(doc)"
|
208
|
+
LintPolicy "-format=%f %l %t %n %m"
|
209
|
+
LintPolicy "-format_specific= "
|
210
|
+
LintPolicy "-pragma(message)"
|
211
|
+
...
|
212
|
+
}
|
213
|
+
</pre></div>
|
214
|
+
</div>
|
215
|
+
</div>
|
216
|
+
</div>
|
217
|
+
<div class="section" id="known-issues">
|
218
|
+
<h3>Known Issues<a class="headerlink" href="#known-issues" title="Permalink to this headline">¶</a></h3>
|
219
|
+
<div class="section" id="bake-only-searches-for-lint-nt-exe">
|
220
|
+
<h4>bake only searches for lint-nt.exe<a class="headerlink" href="#bake-only-searches-for-lint-nt-exe" title="Permalink to this headline">¶</a></h4>
|
221
|
+
<blockquote>
|
222
|
+
<div><p><strong>Issue:</strong>
|
223
|
+
bake currently does not search for all possible names of the lint application, it only searches for a file called <em>lint-nt.exe</em>.</p>
|
224
|
+
<p><strong>Solution:</strong>
|
225
|
+
If you have another lint command (e.g. because you are using flexe lint on unix)
|
226
|
+
just create an symlink/alias which is called <em>lint-nt.exe</em>.</p>
|
227
|
+
</div></blockquote>
|
228
|
+
</div>
|
229
|
+
<div class="section" id="lint-fails-due-to-missing-compiler-includes-and-defines">
|
230
|
+
<h4>Lint fails due to missing compiler includes and defines<a class="headerlink" href="#lint-fails-due-to-missing-compiler-includes-and-defines" title="Permalink to this headline">¶</a></h4>
|
231
|
+
<blockquote>
|
232
|
+
<div><p><strong>Issue:</strong>
|
233
|
+
Lint will fail if compiler internal includes and defines are missing.</p>
|
234
|
+
<p><strong>Solution:</strong></p>
|
235
|
+
<p>Lint comes with some helper files, handle this issue. In order to get a list of all needed
|
236
|
+
helper files e.g. for GCC, use the following command.</p>
|
237
|
+
<div class="highlight-console"><div class="highlight"><pre><span class="gp">User@Host:~$</span> make -f .../PcLint/../lnt/co-gcc.mak
|
238
|
+
</pre></div>
|
239
|
+
</div>
|
240
|
+
<p>You will get a output like this:</p>
|
241
|
+
<div class="highlight-text"><div class="highlight"><pre>gcc-include-path.lnt, lint_cmac.h, lint_cppmac.h and size-options.lnt.
|
242
|
+
</pre></div>
|
243
|
+
</div>
|
244
|
+
<p>You can now add the needed includes and LintPolicies (.lnt files) to your bake
|
245
|
+
configuration.</p>
|
246
|
+
</div></blockquote>
|
247
|
+
</div>
|
248
|
+
<div class="section" id="lint-error-due-to-too-many-includes">
|
249
|
+
<h4>Lint error due to too many includes<a class="headerlink" href="#lint-error-due-to-too-many-includes" title="Permalink to this headline">¶</a></h4>
|
250
|
+
<blockquote>
|
251
|
+
<div><p><strong>Issue:</strong>
|
252
|
+
In rare cases lint has problems if it has to open too many (include) files.</p>
|
253
|
+
<p><strong>Solution:</strong>
|
254
|
+
You can use the <em>–lint-max</em> and the <em>–lint-min</em> options to get around this issue.</p>
|
255
|
+
<p>Example:</p>
|
256
|
+
<div class="highlight-console"><div class="highlight"><pre><span class="gp">User@Host:~$</span> bake Debug -p MyLibraryProject --lint --lint-max <span class="m">50</span> <span class="c">#(lints the first 51 files)</span>
|
257
|
+
<span class="gp">User@Host:~$</span> bake Debug -p MyLibraryProject --lint --lint-min <span class="m">51</span> --lint-max <span class="m">100</span> <span class="c">#(lints the next 50 files)</span>
|
258
|
+
<span class="gp">User@Host:~$</span> bake Debug -p MyLibraryProject --lint --lint-min <span class="m">101</span> <span class="c">#(lints the rest of the files)</span>
|
259
|
+
</pre></div>
|
260
|
+
</div>
|
261
|
+
</div></blockquote>
|
262
|
+
</div>
|
263
|
+
</div>
|
264
|
+
</div>
|
265
|
+
</div>
|
266
|
+
|
267
|
+
|
268
|
+
</div>
|
269
|
+
|
270
|
+
</div>
|
271
|
+
</div>
|
272
|
+
<footer class="footer">
|
273
|
+
<div class="container">
|
274
|
+
<p class="pull-right">
|
275
|
+
<a href="#">Back to top</a>
|
276
|
+
|
277
|
+
</p>
|
278
|
+
<p>
|
279
|
+
© Copyright 2016, E.S.R.Labs AG.<br/>
|
280
|
+
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3.1.<br/>
|
281
|
+
</p>
|
282
|
+
</div>
|
283
|
+
</footer>
|
284
|
+
</body>
|
285
285
|
</html>
|