adlint 1.8.10 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. data/ChangeLog +261 -3
  2. data/MANIFEST +25 -1
  3. data/NEWS +25 -5
  4. data/Rakefile +11 -0
  5. data/TODO +0 -1
  6. data/etc/mesg.d/en_US/messages.yml +1 -1
  7. data/etc/mesg.d/ja_JP/messages.yml +1 -1
  8. data/features/message_detection/W0001.feature +41 -0
  9. data/features/message_detection/W0002.feature +68 -0
  10. data/features/message_detection/W0003.feature +134 -0
  11. data/features/message_detection/W0007.feature +264 -0
  12. data/features/message_detection/W0010.feature +75 -0
  13. data/features/message_detection/W0013.feature +189 -0
  14. data/features/message_detection/W0109.feature +50 -0
  15. data/features/message_detection/W0583.feature +30 -0
  16. data/features/message_detection/W0606.feature +20 -0
  17. data/features/message_detection/W0698.feature +20 -0
  18. data/features/message_detection/W0699.feature +21 -0
  19. data/features/message_detection/W0703.feature +73 -0
  20. data/features/message_detection/W0716.feature +67 -0
  21. data/features/message_detection/W0717.feature +64 -0
  22. data/features/message_detection/W0718.feature +64 -0
  23. data/features/message_detection/W0723.feature +18 -0
  24. data/features/message_detection/W1031.feature +328 -0
  25. data/features/step_definitions/message_detection_steps.rb +45 -0
  26. data/features/support/env.rb +58 -0
  27. data/lib/adlint/c/branch.rb +16 -23
  28. data/lib/adlint/c/code.rb +1 -12
  29. data/lib/adlint/c/conv.rb +4 -4
  30. data/lib/adlint/c/ctrlexpr.rb +10 -6
  31. data/lib/adlint/c/domain.rb +2 -2
  32. data/lib/adlint/c/expr.rb +11 -33
  33. data/lib/adlint/c/format.rb +6 -6
  34. data/lib/adlint/c/interp.rb +137 -80
  35. data/lib/adlint/c/mediator.rb +5 -2
  36. data/lib/adlint/c/message.rb +123 -140
  37. data/lib/adlint/c/message_shima.rb +44 -0
  38. data/lib/adlint/c/object.rb +93 -26
  39. data/lib/adlint/c/option.rb +53 -0
  40. data/lib/adlint/c/phase.rb +4 -1
  41. data/lib/adlint/c/type.rb +112 -46
  42. data/lib/adlint/c.rb +1 -0
  43. data/lib/adlint/version.rb +3 -3
  44. data/share/doc/developers_guide_ja.html +3 -3
  45. data/share/doc/developers_guide_ja.texi +1 -1
  46. data/share/doc/users_guide_en.html +35 -28
  47. data/share/doc/users_guide_en.texi +30 -22
  48. data/share/doc/users_guide_ja.html +35 -31
  49. data/share/doc/users_guide_ja.texi +30 -24
  50. data/spec/adlint/c/type_spec.rb +110 -0
  51. data/spec/conf.d/default_traits.yml +216 -0
  52. data/spec/conf.d/empty_cinit.h +11 -0
  53. data/spec/conf.d/empty_pinit.h +11 -0
  54. data/spec/spec_helper.rb +49 -0
  55. metadata +27 -3
  56. data/spec/MUST_WRITE_SPECS_WITH_RSPEC +0 -0
@@ -0,0 +1,216 @@
1
+ # ___ ____ __ ___ _________
2
+ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer
3
+ # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint
4
+ # / __ |/ /_/ / /___/ / /| / / /
5
+ # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2012, OGIS-RI Co.,Ltd.
6
+ #
7
+ # Traits file generated by adlintize 1.6.0 at 2012-04-23 21:48:10 +0900.
8
+
9
+ # Schema version of the traits file.
10
+ # DO NOT EDIT MANUALLY!
11
+ version: "1.0.0"
12
+
13
+ #
14
+ # Project specific traits section
15
+ #
16
+ project_traits:
17
+
18
+ # Project name.
19
+ project_name: "spec"
20
+
21
+ # Project specific additional include paths.
22
+ # Ex.
23
+ # include_path:
24
+ # - "include/foo"
25
+ # - "../include/bar"
26
+ # - "/opt/baz/include"
27
+ include_path:
28
+
29
+ # Pathname of the project specific initial header file.
30
+ # This header file is automatically included above the first line of the
31
+ # target source file.
32
+ initial_header: "spec/conf.d/empty_pinit.h"
33
+
34
+ #
35
+ # Project specific coding style section
36
+ #
37
+ coding_style:
38
+
39
+ # Indent style which is a convention governing the identation of blocks.
40
+ # Select from "K&R", "Allman" and "GNU".
41
+ #
42
+ # The value "K&R" means...
43
+ # int foo(int i)
44
+ # {
45
+ # if (i == 0) {
46
+ # return 0;
47
+ # }
48
+ # return i;
49
+ # }
50
+ #
51
+ # The value "Allman" means...
52
+ # int foo(int i)
53
+ # {
54
+ # if (i == 0)
55
+ # {
56
+ # return 0;
57
+ # }
58
+ # return i;
59
+ # }
60
+ #
61
+ # The value "GNU" means...
62
+ # int
63
+ # foo(int i)
64
+ # {
65
+ # if (i == 0)
66
+ # {
67
+ # return 0;
68
+ # }
69
+ # return i;
70
+ # }
71
+ indent_style: "K&R"
72
+
73
+ # Appearance width of a TAB character.
74
+ tab_width: 8
75
+
76
+ # Appearance width of 1-level of the indentation.
77
+ indent_width: 4
78
+
79
+ # Encoding of source files.
80
+ file_encoding:
81
+
82
+ #
83
+ # Compiler specific traits section
84
+ #
85
+ compiler_traits:
86
+
87
+ # Pathname of the compiler specific initial header file.
88
+ # This header file is automatically included above the first line of the
89
+ # project specific initial header file.
90
+ initial_header: "spec/conf.d/empty_cinit.h"
91
+
92
+ #
93
+ # Compiler specific standard type section
94
+ #
95
+ standard_type:
96
+
97
+ # Bit size of the `char' type family.
98
+ char_size: 8
99
+ # Bit size of the alignment of the `char' type family.
100
+ char_alignment: 8
101
+
102
+ # Bit size of the `short' type family.
103
+ short_size: 16
104
+ # Bit size of the alignment of the `short' type family.
105
+ short_alignment: 16
106
+
107
+ # Bit size of the `int' type family.
108
+ int_size: 32
109
+ # Bit size of the alignment of the `int' type family.
110
+ int_alignment: 32
111
+
112
+ # Bit size of the `long int' type family.
113
+ long_size: 32
114
+ # Bit size of the alignment of the `long int' type family.
115
+ long_alignment: 32
116
+
117
+ # Bit size of the `long long int' type family.
118
+ long_long_size: 64
119
+ # Bit size of the alignment of the `long long int' type family.
120
+ long_long_alignment: 64
121
+
122
+ # Bit size of the `float' type.
123
+ float_size: 32
124
+ # Bit size of the alignment of the `float' type.
125
+ float_alignment: 32
126
+
127
+ # Bit size of the `double' type.
128
+ double_size: 64
129
+ # Bit size of the alignment of the `double' type.
130
+ double_alignment: 64
131
+
132
+ # Bit size of the `long double' type.
133
+ long_double_size: 96
134
+ # Bit size of the alignment of the `long double' type.
135
+ long_double_alignment: 96
136
+
137
+ # Bit size of the pointer to functions.
138
+ code_ptr_size: 32
139
+ # Bit size of the alignment of the pointer to functions.
140
+ code_ptr_alignment: 32
141
+
142
+ # Bit size of the pointer to data.
143
+ data_ptr_size: 32
144
+ # Bit size of the alignment of the pointer to data.
145
+ data_ptr_alignment: 32
146
+
147
+ # Treat the `char' type as same as the `unsigned char' type?
148
+ char_as_unsigned_char: true
149
+
150
+ # Compiler specific include paths.
151
+ # Ex.
152
+ # include_path:
153
+ # - "/usr/include"
154
+ # - "/usr/local/include"
155
+ include_path:
156
+
157
+ # Treat the `>>' operator as a logical shift, not an arithmetic shift?
158
+ arithmetic:
159
+ logical_right_shift: true
160
+
161
+ # Token substitution setting to warn the use of compiler specific extensions.
162
+ #
163
+ # If your compiler supports `__attribute__(...)' extension and you want to
164
+ # know the use of this extension, specify as below.
165
+ # extension_substitution:
166
+ # "__attribute__(__adlint__any)": ""
167
+ # The token sequence consists of `__attribute__', `(', any kind of tokens,
168
+ # `)' will be replaced with nothing (erased) after the preprocessing phase.
169
+ # And this substitution will be warned by the message W0061.
170
+ extension_substitution:
171
+
172
+ # Token substitution setting to silently ignore the use of compiler specific
173
+ # extensions.
174
+ #
175
+ # If your compiler supports `__asm__ volatile (...)' extension and you do not
176
+ # mind the use of this extension, specify as below.
177
+ # arbitrary_substitution:
178
+ # "__asm__ __adlint__any(__adlint__any)": ""
179
+ # The token sequence consists of `__asm__', any kind of tokens, `(', any kind
180
+ # of tokens, `)' will be replaced with nothing (erased) silently after the
181
+ # preprocessing phase.
182
+ arbitrary_substitution:
183
+ "typeof": "__typeof__"
184
+ "__typeof": "__typeof__"
185
+ "alignof": "__alignof__"
186
+ "__alignof": "__alignof__"
187
+
188
+ # Max length of all symbols can be identified by the compiler.
189
+ identifier_max: 128
190
+
191
+ #
192
+ # Linker specific traits section
193
+ #
194
+ linker_traits:
195
+
196
+ # Max length of external symbols can be identified by the linker.
197
+ identifier_max: 128
198
+
199
+ # Are external symbols identified without case by the linker?
200
+ identifier_ignore_case: false
201
+
202
+ #
203
+ # Message traits section
204
+ #
205
+ message_traits:
206
+
207
+ # Language of the message text.
208
+ # Currently, "en_US" and "ja_JP" are supported.
209
+ # Please help to translate the message catalog into your language.
210
+ language: "ja_JP"
211
+
212
+ # Message text replacement.
213
+ # Ex.
214
+ # change_list:
215
+ # W9999: "Your custom message for the warning of #9999."
216
+ change_list:
@@ -0,0 +1,11 @@
1
+ /* ___ ____ __ ___ _________
2
+ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer
3
+ * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint
4
+ * / __ |/ /_/ / /___/ / /| / / /
5
+ * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2012, OGIS-RI Co.,Ltd.
6
+ *
7
+ * Compiler specific initial header file generated by adlintize 1.6.0
8
+ * at 2012-04-23 21:48:10 +0900.
9
+ */
10
+
11
+ /* Put compiler specific predefined macros and types here. */
@@ -0,0 +1,11 @@
1
+ /* ___ ____ __ ___ _________
2
+ * / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer
3
+ * / /| | / / / / / / / |/ / / / AdLint - Advanced Lint
4
+ * / __ |/ /_/ / /___/ / /| / / /
5
+ * /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2012, OGIS-RI Co.,Ltd.
6
+ *
7
+ * Project specific initial header file generated by adlintize 1.6.0
8
+ * at 2012-04-23 21:48:10 +0900.
9
+ */
10
+
11
+ /* Put project specific predefined macros and types here. */
@@ -0,0 +1,49 @@
1
+ # RSpec helper.
2
+ #
3
+ # Author:: Yutaka Yanoh <mailto:yanoh@users.sourceforge.net>
4
+ # Copyright:: Copyright (C) 2010-2012, OGIS-RI Co.,Ltd.
5
+ # License:: GPLv3+: GNU General Public License version 3 or later
6
+ #
7
+ # Owner:: Yutaka Yanoh <mailto:yanoh@users.sourceforge.net>
8
+
9
+ #--
10
+ # ___ ____ __ ___ _________
11
+ # / | / _ |/ / / / | / /__ __/ Source Code Static Analyzer
12
+ # / /| | / / / / / / / |/ / / / AdLint - Advanced Lint
13
+ # / __ |/ /_/ / /___/ / /| / / /
14
+ # /_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2012, OGIS-RI Co.,Ltd.
15
+ #
16
+ # This file is part of AdLint.
17
+ #
18
+ # AdLint is free software: you can redistribute it and/or modify it under the
19
+ # terms of the GNU General Public License as published by the Free Software
20
+ # Foundation, either version 3 of the License, or (at your option) any later
21
+ # version.
22
+ #
23
+ # AdLint is distributed in the hope that it will be useful, but WITHOUT ANY
24
+ # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
25
+ # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
26
+ #
27
+ # You should have received a copy of the GNU General Public License along with
28
+ # AdLint. If not, see <http://www.gnu.org/licenses/>.
29
+ #
30
+ #++
31
+
32
+ require "pathname"
33
+
34
+ $specdir = Pathname.new(__FILE__).realpath.dirname
35
+ $prefix = Pathname.new("..").expand_path($specdir)
36
+ $libdir = Pathname.new("lib").expand_path($prefix)
37
+
38
+ $:.unshift($libdir.to_s)
39
+
40
+ require "adlint"
41
+
42
+ $specdir = Pathname.new("spec").expand_path($prefix)
43
+ $confdir = Pathname.new("conf.d").expand_path($specdir)
44
+
45
+ $default_traits = Pathname.new("default_traits.yml").expand_path($confdir)
46
+
47
+ RSpec.configure do |c|
48
+ c.color = true
49
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adlint
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.10
4
+ version: 1.10.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-18 00:00:00.000000000 Z
12
+ date: 2012-06-06 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: ! 'AdLint is a source code static analyzer.
15
15
 
@@ -61,6 +61,25 @@ files:
61
61
  - etc/conf.d/noarch/pinit.erb
62
62
  - etc/mesg.d/en_US/messages.yml
63
63
  - etc/mesg.d/ja_JP/messages.yml
64
+ - features/message_detection/W0001.feature
65
+ - features/message_detection/W0002.feature
66
+ - features/message_detection/W0003.feature
67
+ - features/message_detection/W0007.feature
68
+ - features/message_detection/W0010.feature
69
+ - features/message_detection/W0013.feature
70
+ - features/message_detection/W0109.feature
71
+ - features/message_detection/W0583.feature
72
+ - features/message_detection/W0606.feature
73
+ - features/message_detection/W0698.feature
74
+ - features/message_detection/W0699.feature
75
+ - features/message_detection/W0703.feature
76
+ - features/message_detection/W0716.feature
77
+ - features/message_detection/W0717.feature
78
+ - features/message_detection/W0718.feature
79
+ - features/message_detection/W0723.feature
80
+ - features/message_detection/W1031.feature
81
+ - features/step_definitions/message_detection_steps.rb
82
+ - features/support/env.rb
64
83
  - lib/adlint.rb
65
84
  - lib/adlint/analyzer.rb
66
85
  - lib/adlint/c.rb
@@ -82,6 +101,7 @@ files:
82
101
  - lib/adlint/c/message_shima.rb
83
102
  - lib/adlint/c/metric.rb
84
103
  - lib/adlint/c/object.rb
104
+ - lib/adlint/c/option.rb
85
105
  - lib/adlint/c/parser.y
86
106
  - lib/adlint/c/parser.rb
87
107
  - lib/adlint/c/phase.rb
@@ -516,7 +536,11 @@ files:
516
536
  - share/sample/zsh-4.3.15/adlint/zle/adlint_cinit.h
517
537
  - share/sample/zsh-4.3.15/adlint/zle/adlint_pinit.h
518
538
  - share/sample/zsh-4.3.15/adlint/zle/adlint_traits.yml
519
- - spec/MUST_WRITE_SPECS_WITH_RSPEC
539
+ - spec/spec_helper.rb
540
+ - spec/adlint/c/type_spec.rb
541
+ - spec/conf.d/empty_cinit.h
542
+ - spec/conf.d/empty_pinit.h
543
+ - spec/conf.d/default_traits.yml
520
544
  homepage: http://adlint.sourceforge.net/
521
545
  licenses:
522
546
  - ! 'GPLv3+: GNU General Public License version 3 or later'
File without changes