adlint 3.2.6 → 3.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +23 -0
- data/NEWS +11 -3
- data/etc/mesg.d/c_builtin/en_US/messages.yml +1 -1
- data/etc/mesg.d/c_builtin/ja_JP/messages.yml +1 -1
- data/etc/mesg.d/core/en_US/messages.yml +1 -1
- data/etc/mesg.d/core/ja_JP/messages.yml +1 -1
- data/features/code_check/E0008.feature +116 -0
- data/lib/adlint/cc1/scanner.rb +1 -1
- data/lib/adlint/version.rb +2 -2
- data/share/doc/developers_guide_ja.html +3 -3
- data/share/doc/developers_guide_ja.texi +1 -1
- data/share/doc/users_guide_en.html +3 -3
- data/share/doc/users_guide_en.texi +1 -1
- data/share/doc/users_guide_ja.html +3 -3
- data/share/doc/users_guide_ja.texi +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8916d310fa0ededda3bd70f09eb99d8cf427d003
|
4
|
+
data.tar.gz: e5397db4eb1ddc9ed6aa64fe6897c338a67d667a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7cd935287b1973ef6f702ea7d97beb43b549369234ec763b25778cb8e091249bcd1fb41598c9878c26bb6a1341ead9981bfdcef27164cd86334ccb59bfe2d2c2
|
7
|
+
data.tar.gz: 3ded4f16cbe974f97c855a91a184b81ed9e131734ed2e074ae60e2a100c288f88f87173e68516831cd2f3c013074b3fb81c3743b1df0ada713b0426c9c8c1367
|
data/ChangeLog
CHANGED
@@ -1,3 +1,26 @@
|
|
1
|
+
Fri Feb 7 14:54:17 2014 Yutaka Yanoh <yanoh@users.sourceforge.net>
|
2
|
+
|
3
|
+
* release.ga : 3.2.8
|
4
|
+
- Fix preprocessor in order not to abend when a function-like macro
|
5
|
+
generates a hexadecimal integer-constant from standalone prefix and
|
6
|
+
number by the concatenation operator.
|
7
|
+
|
8
|
+
Thu Feb 6 15:22:34 2014 Yutaka Yanoh <yanoh@users.sourceforge.net>
|
9
|
+
|
10
|
+
* release.rc : 3.2.7
|
11
|
+
- Fix preprocessor in order not to abend when a function-like macro
|
12
|
+
generates a hexadecimal integer-constant from standalone prefix and
|
13
|
+
number by the concatenation operator.
|
14
|
+
|
15
|
+
Wed Feb 5 10:28:10 2014 Yutaka Yanoh <yanoh@users.sourceforge.net>
|
16
|
+
|
17
|
+
* lib/adlint/cc1/scanner.rb : Fix preprocessor in order not to abend
|
18
|
+
when a function-like macro generates a hexadecimal integer-constant
|
19
|
+
from standalone prefix and number by the concatenation operator.
|
20
|
+
|
21
|
+
* features/code_check/E0008.feature : Add token concatenation scenarios
|
22
|
+
to reproduce the bug reported on the AdLint PAD site.
|
23
|
+
|
1
24
|
Thu Jan 9 15:22:32 2014 Yutaka Yanoh <yanoh@users.sourceforge.net>
|
2
25
|
|
3
26
|
* release.ga : 3.2.6
|
data/NEWS
CHANGED
@@ -21,6 +21,17 @@
|
|
21
21
|
|
22
22
|
++
|
23
23
|
|
24
|
+
=== \AdLint 3.2.8 is released (2014-02-07)
|
25
|
+
|
26
|
+
==== Changes since the 3.2.6 release
|
27
|
+
|
28
|
+
* Fix preprocessor in order not to abend when a function-like macro generates a
|
29
|
+
hexadecimal integer-constant from standalone prefix and number by the
|
30
|
+
concatenation operator
|
31
|
+
|
32
|
+
See the file {ChangeLog}[https://github.com/yanoh/adlint/blob/master/ChangeLog]
|
33
|
+
for more details.
|
34
|
+
|
24
35
|
=== \AdLint 3.2.6 is released (2014-01-09)
|
25
36
|
|
26
37
|
==== Changes since the 3.2.0 release
|
@@ -36,9 +47,6 @@
|
|
36
47
|
* Revise the parser generation rule in order to accept extra semicolons in the
|
37
48
|
global scope
|
38
49
|
|
39
|
-
See the file {ChangeLog}[https://github.com/yanoh/adlint/blob/master/ChangeLog]
|
40
|
-
for more details.
|
41
|
-
|
42
50
|
=== \AdLint 3.2.0 is released (2013-08-28)
|
43
51
|
|
44
52
|
==== Changes since the 3.0.10 release
|
@@ -140,3 +140,119 @@ Feature: E0008
|
|
140
140
|
| W0586 | 2 | 19 |
|
141
141
|
| W0586 | 1 | 26 |
|
142
142
|
| W0586 | 2 | 26 |
|
143
|
+
|
144
|
+
Scenario: concatenating hexadecimal prefix and number in function-form macro
|
145
|
+
Given a target source named "fixture.c" with:
|
146
|
+
"""
|
147
|
+
#define HEX(num) 0x##num
|
148
|
+
|
149
|
+
static void foo(void)
|
150
|
+
{
|
151
|
+
int i = HEX(123); /* should be replaced into "0x123" not "0 x123" */
|
152
|
+
}
|
153
|
+
"""
|
154
|
+
When I successfully run `adlint fixture.c` on noarch
|
155
|
+
Then the output should exactly match with:
|
156
|
+
| mesg | line | column |
|
157
|
+
| W0442 | 1 | 1 |
|
158
|
+
| W1076 | 3 | 13 |
|
159
|
+
| W0076 | 5 | 13 |
|
160
|
+
| W0100 | 5 | 9 |
|
161
|
+
| W0629 | 3 | 13 |
|
162
|
+
| W0628 | 3 | 13 |
|
163
|
+
|
164
|
+
Scenario: concatenating hexadecimal prefix and number in function-form macro
|
165
|
+
Given a target source named "fixture.c" with:
|
166
|
+
"""
|
167
|
+
#define HEX(num) 0x##num
|
168
|
+
|
169
|
+
static void foo(void)
|
170
|
+
{
|
171
|
+
int i = HEX(AB123CD); /* should be replaced into "0xAB123CD" */
|
172
|
+
}
|
173
|
+
"""
|
174
|
+
When I successfully run `adlint fixture.c` on noarch
|
175
|
+
Then the output should exactly match with:
|
176
|
+
| mesg | line | column |
|
177
|
+
| W0442 | 1 | 1 |
|
178
|
+
| W1076 | 3 | 13 |
|
179
|
+
| W0076 | 5 | 13 |
|
180
|
+
| W0100 | 5 | 9 |
|
181
|
+
| W0629 | 3 | 13 |
|
182
|
+
| W0628 | 3 | 13 |
|
183
|
+
|
184
|
+
Scenario: concatenating hexadecimal prefix and number in function-form macro
|
185
|
+
Given a target source named "fixture.c" with:
|
186
|
+
"""
|
187
|
+
#define HEX(num) 0x##num
|
188
|
+
|
189
|
+
static void foo(void)
|
190
|
+
{
|
191
|
+
int i = HEX(ABCD); /* should be replaced into "0xABCD" */
|
192
|
+
}
|
193
|
+
"""
|
194
|
+
When I successfully run `adlint fixture.c` on noarch
|
195
|
+
Then the output should exactly match with:
|
196
|
+
| mesg | line | column |
|
197
|
+
| W0442 | 1 | 1 |
|
198
|
+
| W1076 | 3 | 13 |
|
199
|
+
| W0076 | 5 | 13 |
|
200
|
+
| W0100 | 5 | 9 |
|
201
|
+
| W0629 | 3 | 13 |
|
202
|
+
| W0628 | 3 | 13 |
|
203
|
+
|
204
|
+
Scenario: concatenating hexadecimal prefix and number in function-form macro
|
205
|
+
Given a target source named "fixture.c" with:
|
206
|
+
"""
|
207
|
+
#define HEX(num) 0##num
|
208
|
+
|
209
|
+
static void foo(void)
|
210
|
+
{
|
211
|
+
int i = HEX(x123); /* should be replaced into "0x123" not "0 x123" */
|
212
|
+
}
|
213
|
+
"""
|
214
|
+
When I successfully run `adlint fixture.c` on noarch
|
215
|
+
Then the output should exactly match with:
|
216
|
+
| mesg | line | column |
|
217
|
+
| W0442 | 1 | 1 |
|
218
|
+
| W1076 | 3 | 13 |
|
219
|
+
| W0076 | 5 | 13 |
|
220
|
+
| W0100 | 5 | 9 |
|
221
|
+
| W0629 | 3 | 13 |
|
222
|
+
| W0628 | 3 | 13 |
|
223
|
+
|
224
|
+
Scenario: concatenating hexadecimal prefix and number in function-form macro
|
225
|
+
Given a target source named "fixture.c" with:
|
226
|
+
"""
|
227
|
+
#define HEX(num) 0x0##num
|
228
|
+
|
229
|
+
static void foo(void)
|
230
|
+
{
|
231
|
+
int i = HEX(123); /* should be replaced into "0x0123" */
|
232
|
+
}
|
233
|
+
"""
|
234
|
+
When I successfully run `adlint fixture.c` on noarch
|
235
|
+
Then the output should exactly match with:
|
236
|
+
| mesg | line | column |
|
237
|
+
| W0442 | 1 | 1 |
|
238
|
+
| W1076 | 3 | 13 |
|
239
|
+
| W0076 | 5 | 13 |
|
240
|
+
| W0100 | 5 | 9 |
|
241
|
+
| W0629 | 3 | 13 |
|
242
|
+
| W0628 | 3 | 13 |
|
243
|
+
|
244
|
+
Scenario: ill-formed standalone hexadecimal prefix
|
245
|
+
Given a target source named "fixture.c" with:
|
246
|
+
"""
|
247
|
+
static void foo(void)
|
248
|
+
{
|
249
|
+
int i = 0x;
|
250
|
+
}
|
251
|
+
"""
|
252
|
+
When I successfully run `adlint fixture.c` on noarch
|
253
|
+
Then the output should exactly match with:
|
254
|
+
| mesg | line | column |
|
255
|
+
| W1076 | 1 | 13 |
|
256
|
+
| W0100 | 3 | 9 |
|
257
|
+
| W0629 | 1 | 13 |
|
258
|
+
| W0628 | 1 | 13 |
|
data/lib/adlint/cc1/scanner.rb
CHANGED
@@ -155,7 +155,7 @@ module Cc1 #:nodoc:
|
|
155
155
|
# String -- Returns C integer constant string if found at head of the
|
156
156
|
# content.
|
157
157
|
def scan_integer_constant(cont)
|
158
|
-
cont.scan(/(?:0x[0-9a-f]
|
158
|
+
cont.scan(/(?:0x[0-9a-f]*|0b[01]*|[0-9]+)[UL]*/i)
|
159
159
|
end
|
160
160
|
|
161
161
|
FLOATING1_RE = /(?:[0-9]*\.[0-9]*E[+-]?[0-9]+|[0-9]+\.?E[+-]?[0-9]+)[FL]*/i
|
data/lib/adlint/version.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
<html lang="ja">
|
2
2
|
<head>
|
3
|
-
<title>AdLint 3.2.
|
3
|
+
<title>AdLint 3.2.8 開発者ガイド</title>
|
4
4
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
5
|
-
<meta name="description" content="AdLint 3.2.
|
5
|
+
<meta name="description" content="AdLint 3.2.8 開発者ガイド">
|
6
6
|
<meta name="generator" content="makeinfo 4.13">
|
7
7
|
<link title="Top" rel="top" href="#Top">
|
8
8
|
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
@@ -44,7 +44,7 @@ td { border: 1px solid black; }
|
|
44
44
|
--></style>
|
45
45
|
</head>
|
46
46
|
<body>
|
47
|
-
<h1 class="settitle">AdLint 3.2.
|
47
|
+
<h1 class="settitle">AdLint 3.2.8 開発者ガイド</h1>
|
48
48
|
<div class="contents">
|
49
49
|
<h2>Table of Contents</h2>
|
50
50
|
<ul>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<html lang="en">
|
2
2
|
<head>
|
3
|
-
<title>AdLint 3.2.
|
3
|
+
<title>AdLint 3.2.8 User's Guide</title>
|
4
4
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
5
|
-
<meta name="description" content="AdLint 3.2.
|
5
|
+
<meta name="description" content="AdLint 3.2.8 User's Guide">
|
6
6
|
<meta name="generator" content="makeinfo 4.13">
|
7
7
|
<link title="Top" rel="top" href="#Top">
|
8
8
|
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
@@ -44,7 +44,7 @@ td { border: 1px solid black; }
|
|
44
44
|
--></style>
|
45
45
|
</head>
|
46
46
|
<body>
|
47
|
-
<h1 class="settitle">AdLint 3.2.
|
47
|
+
<h1 class="settitle">AdLint 3.2.8 User's Guide</h1>
|
48
48
|
<div class="node">
|
49
49
|
<a name="Top"></a>
|
50
50
|
<p><hr>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<html lang="ja">
|
2
2
|
<head>
|
3
|
-
<title>AdLint 3.2.
|
3
|
+
<title>AdLint 3.2.8 利用者ガイド</title>
|
4
4
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
5
|
-
<meta name="description" content="AdLint 3.2.
|
5
|
+
<meta name="description" content="AdLint 3.2.8 利用者ガイド">
|
6
6
|
<meta name="generator" content="makeinfo 4.13">
|
7
7
|
<link title="Top" rel="top" href="#Top">
|
8
8
|
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
@@ -44,7 +44,7 @@ td { border: 1px solid black; }
|
|
44
44
|
--></style>
|
45
45
|
</head>
|
46
46
|
<body>
|
47
|
-
<h1 class="settitle">AdLint 3.2.
|
47
|
+
<h1 class="settitle">AdLint 3.2.8 利用者ガイド</h1>
|
48
48
|
<div class="node">
|
49
49
|
<a name="Top"></a>
|
50
50
|
<p><hr>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adlint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yutaka Yanoh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |
|
14
14
|
AdLint is a source code static analyzer.
|