adlint 1.16.0 → 1.18.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +471 -0
- data/MANIFEST +35 -8
- data/NEWS +50 -4
- data/bin/adlint +7 -7
- data/bin/adlint_chk +7 -7
- data/bin/adlint_cma +7 -7
- data/bin/adlint_sma +7 -7
- data/bin/adlintize +5 -5
- data/etc/mesg.d/en_US/messages.yml +3 -3
- data/etc/mesg.d/ja_JP/messages.yml +3 -3
- data/features/message_detection/E0013.feature +34 -0
- data/features/message_detection/W0007.feature +2 -0
- data/features/message_detection/W0583.feature +1 -2
- data/features/message_detection/W0641.feature +132 -0
- data/features/message_detection/W0643.feature +1 -1
- data/features/message_detection/W0644.feature +529 -0
- data/features/message_detection/W0645.feature +1 -1
- data/features/message_detection/W0649.feature +277 -0
- data/features/message_detection/W0650.feature +208 -0
- data/features/message_detection/W0697.feature +6 -0
- data/features/message_detection/W0705.feature +350 -0
- data/features/message_detection/W0707.feature +223 -0
- data/features/message_detection/W0711.feature +113 -0
- data/features/message_detection/W0712.feature +113 -0
- data/features/message_detection/W0713.feature +110 -0
- data/features/message_detection/W0714.feature +118 -0
- data/features/message_detection/W0715.feature +118 -0
- data/features/message_detection/W0716.feature +1 -0
- data/features/message_detection/W0717.feature +1 -0
- data/features/message_detection/W0718.feature +1 -0
- data/features/message_detection/W0719.feature +154 -0
- data/features/message_detection/W0723.feature +1 -2
- data/features/message_detection/W0732.feature +3 -0
- data/features/message_detection/W0733.feature +3 -0
- data/features/message_detection/W0734.feature +4 -0
- data/features/message_detection/W0735.feature +4 -0
- data/features/message_detection/W0745.feature +132 -0
- data/features/message_detection/W0780.feature +68 -0
- data/features/message_detection/W0783.feature +95 -0
- data/features/message_detection/W0792.feature +124 -0
- data/features/message_detection/W0793.feature +153 -0
- data/features/message_detection/W0794.feature +90 -0
- data/features/message_detection/W0830.feature +65 -0
- data/features/message_detection/W0833.feature +220 -0
- data/features/message_detection/W0834.feature +189 -0
- data/features/message_detection/W1026.feature +105 -0
- data/features/message_detection/W1031.feature +17 -34
- data/features/message_detection/W1039.feature +268 -0
- data/features/message_detection/W1047.feature +163 -0
- data/features/message_detection/W1066.feature +1 -0
- data/features/message_detection/W1067.feature +1 -0
- data/features/message_detection/W1068.feature +1 -0
- data/features/message_detection/W1069.feature +5 -0
- data/features/message_detection/W1070.feature +5 -0
- data/features/message_detection/W1071.feature +83 -0
- data/features/message_detection/W1073.feature +3 -2
- data/features/message_detection/W9003.feature +7 -12
- data/features/step_definitions/message_detection_steps.rb +4 -31
- data/features/support/env.rb +117 -2
- data/lib/adlint/c/branch.rb +0 -2
- data/lib/adlint/c/ctrlexpr.rb +33 -0
- data/lib/adlint/c/expr.rb +119 -31
- data/lib/adlint/c/interp.rb +44 -3
- data/lib/adlint/c/message.rb +1411 -29
- data/lib/adlint/c/object.rb +16 -2
- data/lib/adlint/c/option.rb +1 -0
- data/lib/adlint/c/parser.rb +101 -100
- data/lib/adlint/c/parser.y +3 -2
- data/lib/adlint/c/phase.rb +18 -0
- data/lib/adlint/c/resolver.rb +23 -0
- data/lib/adlint/c/syntax.rb +90 -4
- data/lib/adlint/c/type.rb +177 -110
- data/lib/adlint/cpp/macro.rb +4 -4
- data/lib/adlint/version.rb +2 -2
- data/share/demo/bad_include/test/"1/".h +0 -0
- 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 +467 -506
- data/share/doc/users_guide_en.texi +95 -125
- data/share/doc/users_guide_ja.html +471 -518
- data/share/doc/users_guide_ja.texi +95 -133
- data/spec/spec_helper.rb +6 -0
- metadata +37 -10
data/MANIFEST
CHANGED
@@ -28,6 +28,7 @@ etc/conf.d/noarch/adlint_all_sh.erb
|
|
28
28
|
etc/conf.d/noarch/pinit.erb
|
29
29
|
etc/mesg.d/en_US/messages.yml
|
30
30
|
etc/mesg.d/ja_JP/messages.yml
|
31
|
+
features/message_detection/E0013.feature
|
31
32
|
features/message_detection/W0001.feature
|
32
33
|
features/message_detection/W0002.feature
|
33
34
|
features/message_detection/W0003.feature
|
@@ -39,9 +40,13 @@ features/message_detection/W0104.feature
|
|
39
40
|
features/message_detection/W0109.feature
|
40
41
|
features/message_detection/W0583.feature
|
41
42
|
features/message_detection/W0606.feature
|
43
|
+
features/message_detection/W0641.feature
|
42
44
|
features/message_detection/W0643.feature
|
45
|
+
features/message_detection/W0644.feature
|
43
46
|
features/message_detection/W0645.feature
|
44
47
|
features/message_detection/W0646.feature
|
48
|
+
features/message_detection/W0649.feature
|
49
|
+
features/message_detection/W0650.feature
|
45
50
|
features/message_detection/W0687.feature
|
46
51
|
features/message_detection/W0688.feature
|
47
52
|
features/message_detection/W0689.feature
|
@@ -54,26 +59,47 @@ features/message_detection/W0698.feature
|
|
54
59
|
features/message_detection/W0699.feature
|
55
60
|
features/message_detection/W0700.feature
|
56
61
|
features/message_detection/W0703.feature
|
62
|
+
features/message_detection/W0705.feature
|
63
|
+
features/message_detection/W0707.feature
|
64
|
+
features/message_detection/W0711.feature
|
65
|
+
features/message_detection/W0712.feature
|
66
|
+
features/message_detection/W0713.feature
|
67
|
+
features/message_detection/W0714.feature
|
68
|
+
features/message_detection/W0715.feature
|
57
69
|
features/message_detection/W0716.feature
|
58
70
|
features/message_detection/W0717.feature
|
59
71
|
features/message_detection/W0718.feature
|
72
|
+
features/message_detection/W0719.feature
|
60
73
|
features/message_detection/W0723.feature
|
61
74
|
features/message_detection/W0732.feature
|
62
75
|
features/message_detection/W0733.feature
|
63
76
|
features/message_detection/W0734.feature
|
64
77
|
features/message_detection/W0735.feature
|
78
|
+
features/message_detection/W0745.feature
|
79
|
+
features/message_detection/W0780.feature
|
80
|
+
features/message_detection/W0783.feature
|
81
|
+
features/message_detection/W0792.feature
|
82
|
+
features/message_detection/W0793.feature
|
83
|
+
features/message_detection/W0794.feature
|
65
84
|
features/message_detection/W0805.feature
|
66
85
|
features/message_detection/W0811.feature
|
86
|
+
features/message_detection/W0830.feature
|
87
|
+
features/message_detection/W0833.feature
|
88
|
+
features/message_detection/W0834.feature
|
89
|
+
features/message_detection/W1026.feature
|
67
90
|
features/message_detection/W1031.feature
|
91
|
+
features/message_detection/W1039.feature
|
68
92
|
features/message_detection/W1040.feature
|
69
93
|
features/message_detection/W1041.feature
|
70
94
|
features/message_detection/W1046.feature
|
95
|
+
features/message_detection/W1047.feature
|
71
96
|
features/message_detection/W1052.feature
|
72
97
|
features/message_detection/W1066.feature
|
73
98
|
features/message_detection/W1067.feature
|
74
99
|
features/message_detection/W1068.feature
|
75
100
|
features/message_detection/W1069.feature
|
76
101
|
features/message_detection/W1070.feature
|
102
|
+
features/message_detection/W1071.feature
|
77
103
|
features/message_detection/W1072.feature
|
78
104
|
features/message_detection/W1073.feature
|
79
105
|
features/message_detection/W1074.feature
|
@@ -107,8 +133,8 @@ lib/adlint/c/metric.rb
|
|
107
133
|
lib/adlint/c/object.rb
|
108
134
|
lib/adlint/c/operator.rb
|
109
135
|
lib/adlint/c/option.rb
|
110
|
-
lib/adlint/c/parser.y
|
111
136
|
lib/adlint/c/parser.rb
|
137
|
+
lib/adlint/c/parser.y
|
112
138
|
lib/adlint/c/phase.rb
|
113
139
|
lib/adlint/c/resolver.rb
|
114
140
|
lib/adlint/c/scanner.rb
|
@@ -122,8 +148,8 @@ lib/adlint/code.rb
|
|
122
148
|
lib/adlint/cpp.rb
|
123
149
|
lib/adlint/cpp/asm.rb
|
124
150
|
lib/adlint/cpp/code.rb
|
125
|
-
lib/adlint/cpp/constexpr.y
|
126
151
|
lib/adlint/cpp/constexpr.rb
|
152
|
+
lib/adlint/cpp/constexpr.y
|
127
153
|
lib/adlint/cpp/eval.rb
|
128
154
|
lib/adlint/cpp/lexer.rb
|
129
155
|
lib/adlint/cpp/macro.rb
|
@@ -172,6 +198,7 @@ share/demo/bad_const/bad_const.c
|
|
172
198
|
share/demo/bad_conv/bad_conv.c
|
173
199
|
share/demo/bad_enum/bad_enum.c
|
174
200
|
share/demo/bad_include/bad_include.c
|
201
|
+
share/demo/bad_include/test"1".h
|
175
202
|
share/demo/bad_include/test'1'.h
|
176
203
|
share/demo/bad_include/test'2'.h
|
177
204
|
share/demo/bad_indent/bad_indent.c
|
@@ -258,8 +285,8 @@ share/demo/should_be_typedef/should_be_typedef.c
|
|
258
285
|
share/demo/static_paths/static_paths.c
|
259
286
|
share/demo/static_vars/static_vars.c
|
260
287
|
share/demo/tag_hiding/tag_hiding.c
|
261
|
-
share/demo/typedef_each_src/typedef_each_src.c
|
262
288
|
share/demo/tricky_incdec/tricky_incdec.c
|
289
|
+
share/demo/typedef_each_src/typedef_each_src.c
|
263
290
|
share/demo/undefined_macro/undefined_macro.c
|
264
291
|
share/demo/uninit_vars/uninit_vars.c
|
265
292
|
share/demo/union_type/union_type.c
|
@@ -297,16 +324,16 @@ share/doc/adlint_on_eclipse_en.png
|
|
297
324
|
share/doc/adlint_on_eclipse_ja.png
|
298
325
|
share/doc/adlint_on_vim_en.png
|
299
326
|
share/doc/adlint_on_vim_ja.png
|
300
|
-
share/doc/developers_guide_ja.texi
|
301
327
|
share/doc/developers_guide_ja.html
|
328
|
+
share/doc/developers_guide_ja.texi
|
302
329
|
share/doc/gen_mesg_sections.rb
|
303
330
|
share/doc/samples/GNUmakefile
|
304
331
|
share/doc/samples/adlint_traits.yml
|
305
332
|
share/doc/texinfo.css
|
306
|
-
share/doc/users_guide_en.texi
|
307
333
|
share/doc/users_guide_en.html
|
308
|
-
share/doc/
|
334
|
+
share/doc/users_guide_en.texi
|
309
335
|
share/doc/users_guide_ja.html
|
336
|
+
share/doc/users_guide_ja.texi
|
310
337
|
share/logo/adlint-110.png
|
311
338
|
share/logo/adlint-524.png
|
312
339
|
share/logo/adlint.svg
|
@@ -541,12 +568,12 @@ share/sample/zsh-4.3.15/adlint/zle/GNUmakefile
|
|
541
568
|
share/sample/zsh-4.3.15/adlint/zle/adlint_cinit.h
|
542
569
|
share/sample/zsh-4.3.15/adlint/zle/adlint_pinit.h
|
543
570
|
share/sample/zsh-4.3.15/adlint/zle/adlint_traits.yml
|
544
|
-
spec/spec_helper.rb
|
545
571
|
spec/adlint/c/ctrlexpr_spec.rb
|
546
572
|
spec/adlint/c/domain_spec.rb
|
547
573
|
spec/adlint/c/operator_spec.rb
|
548
574
|
spec/adlint/c/syntax_spec.rb
|
549
575
|
spec/adlint/c/type_spec.rb
|
576
|
+
spec/conf.d/default_traits.yml
|
550
577
|
spec/conf.d/empty_cinit.h
|
551
578
|
spec/conf.d/empty_pinit.h
|
552
|
-
spec/
|
579
|
+
spec/spec_helper.rb
|
data/NEWS
CHANGED
@@ -21,6 +21,56 @@
|
|
21
21
|
|
22
22
|
++
|
23
23
|
|
24
|
+
=== \AdLint 1.18.0 is released (2012-08-01)
|
25
|
+
|
26
|
+
==== Changes since the 1.16.0 release
|
27
|
+
|
28
|
+
* Add W0641 detection
|
29
|
+
* Add W0644 detection
|
30
|
+
* Add W0649 detection
|
31
|
+
* Add W0650 detection
|
32
|
+
* Add W0707 detection
|
33
|
+
* Add W0719 detection
|
34
|
+
* Add W0780 detection
|
35
|
+
* Add W0783 detection
|
36
|
+
* Add W0792 detection
|
37
|
+
* Add W0793 detection
|
38
|
+
* Add W0794 detection
|
39
|
+
* Add W0830 detection
|
40
|
+
* Add W0833 detection
|
41
|
+
* Add W0834 detection
|
42
|
+
* Add W1026 detection
|
43
|
+
* Add W1039 detection
|
44
|
+
* Add W1047 detection
|
45
|
+
* Add W1071 detection
|
46
|
+
* Fix W0459 detection to output outermost variable name when the uninitialized
|
47
|
+
variable is an array element or a member of struct or union
|
48
|
+
* Fix W0705 and W0745 detections to warn about not only
|
49
|
+
array-subscript-expressions but also indirection-expressions only when the
|
50
|
+
subscript is constant
|
51
|
+
* Revise expression evaluation not to give up when a operand is typed as `void'
|
52
|
+
* Revise arithmetic type resolution not to abort when one type is `void'
|
53
|
+
* Fix declarator evaluation in order to construct a function object which
|
54
|
+
returns a function pointer correctly when the function-definition written
|
55
|
+
without typedefed function pointer
|
56
|
+
* Implement missing semantics of union object initialization
|
57
|
+
* Revise function-like macro replacement in order to evaluate `#' operator
|
58
|
+
makes an empty string-literal when the parameter corresponding to the operand
|
59
|
+
has no argument
|
60
|
+
* Fix bad sequence-point timing of logical-and-expression and
|
61
|
+
logical-or-expression
|
62
|
+
* Add extra notification of variable value reference in evaluation of
|
63
|
+
cast-expression in order not to misunderstand that a return value of a
|
64
|
+
function is discarded when the return value is casted before assigning to a
|
65
|
+
variable
|
66
|
+
* Fix evaluation of prefix-increment-expression and prefix-decrement-expression
|
67
|
+
to make rvalue of the new incremented or decremented value in order to comply
|
68
|
+
with the ISO C99 standard
|
69
|
+
|
70
|
+
See the file
|
71
|
+
{ChangeLog}[http://adlint.sourceforge.net/pmwiki/upload.d/Main/ChangeLog]
|
72
|
+
for more details.
|
73
|
+
|
24
74
|
=== \AdLint 1.16.0 is released (2012-07-18)
|
25
75
|
|
26
76
|
==== Changes since the 1.14.0 release
|
@@ -47,10 +97,6 @@
|
|
47
97
|
* Add missing notification of variable value reference in comparison
|
48
98
|
expressions
|
49
99
|
|
50
|
-
See the file
|
51
|
-
{ChangeLog}[http://adlint.sourceforge.net/pmwiki/upload.d/Main/ChangeLog]
|
52
|
-
for more details.
|
53
|
-
|
54
100
|
=== \AdLint 1.14.0 is released (2012-07-04)
|
55
101
|
|
56
102
|
==== Changes since the 1.12.0 release
|
data/bin/adlint
CHANGED
@@ -45,9 +45,9 @@ $:.unshift($libdir.to_s)
|
|
45
45
|
|
46
46
|
require "adlint"
|
47
47
|
|
48
|
-
|
48
|
+
$version = "AdLint all in one analyzer #{AdLint::VERSION}"
|
49
49
|
|
50
|
-
|
50
|
+
$usage = <<EOS
|
51
51
|
Usage: adlint [options] [source-file...]
|
52
52
|
Options:
|
53
53
|
-t FILE, --traits FILE Use FILE as traits file (mandatory)
|
@@ -95,7 +95,7 @@ begin
|
|
95
95
|
when "--verbose"
|
96
96
|
verbose = true
|
97
97
|
when "--version"
|
98
|
-
puts
|
98
|
+
puts $version, AdLint::AUTHOR
|
99
99
|
exit 0
|
100
100
|
when "--copyright"
|
101
101
|
puts AdLint::COPYRIGHT
|
@@ -104,12 +104,12 @@ begin
|
|
104
104
|
puts $prefix
|
105
105
|
exit 0
|
106
106
|
when "--help"
|
107
|
-
puts
|
107
|
+
puts $usage
|
108
108
|
exit 0
|
109
109
|
end
|
110
110
|
end
|
111
111
|
rescue
|
112
|
-
$stderr.puts
|
112
|
+
$stderr.puts $usage
|
113
113
|
exit 1
|
114
114
|
end
|
115
115
|
|
@@ -121,13 +121,13 @@ end
|
|
121
121
|
|
122
122
|
if fpaths.empty?
|
123
123
|
$stderr.puts "#{File.basename(__FILE__)}: no input files"
|
124
|
-
$stderr.puts
|
124
|
+
$stderr.puts $usage
|
125
125
|
exit 1
|
126
126
|
end
|
127
127
|
|
128
128
|
unless traits_fpath
|
129
129
|
$stderr.puts "#{File.basename(__FILE__)}: no traits file"
|
130
|
-
$stderr.puts
|
130
|
+
$stderr.puts $usage
|
131
131
|
exit 1
|
132
132
|
end
|
133
133
|
|
data/bin/adlint_chk
CHANGED
@@ -45,9 +45,9 @@ $:.unshift($libdir.to_s)
|
|
45
45
|
|
46
46
|
require "adlint"
|
47
47
|
|
48
|
-
|
48
|
+
$version = "AdLint configuration validator #{AdLint::VERSION}"
|
49
49
|
|
50
|
-
|
50
|
+
$usage = <<EOS
|
51
51
|
Usage: adlint_chk [options] source-file...
|
52
52
|
Options:
|
53
53
|
-t FILE, --traits FILE Use FILE as traits file (mandatory)
|
@@ -90,7 +90,7 @@ begin
|
|
90
90
|
when "--verbose"
|
91
91
|
verbose = true
|
92
92
|
when "--version"
|
93
|
-
puts
|
93
|
+
puts $version, AdLint::AUTHOR
|
94
94
|
exit 0
|
95
95
|
when "--copyright"
|
96
96
|
puts AdLint::COPYRIGHT
|
@@ -99,12 +99,12 @@ begin
|
|
99
99
|
puts $prefix
|
100
100
|
exit 0
|
101
101
|
when "--help"
|
102
|
-
puts
|
102
|
+
puts $usage
|
103
103
|
exit 0
|
104
104
|
end
|
105
105
|
end
|
106
106
|
rescue
|
107
|
-
$stderr.puts
|
107
|
+
$stderr.puts $usage
|
108
108
|
exit 1
|
109
109
|
end
|
110
110
|
|
@@ -112,13 +112,13 @@ fpaths = ARGV.map { |str| Pathname.new(str) }
|
|
112
112
|
|
113
113
|
if fpaths.empty?
|
114
114
|
$stderr.puts "#{File.basename(__FILE__)}: no input files"
|
115
|
-
$stderr.puts
|
115
|
+
$stderr.puts $usage
|
116
116
|
exit 1
|
117
117
|
end
|
118
118
|
|
119
119
|
unless traits_fpath
|
120
120
|
$stderr.puts "#{File.basename(__FILE__)}: no traits file"
|
121
|
-
$stderr.puts
|
121
|
+
$stderr.puts $usage
|
122
122
|
exit 1
|
123
123
|
end
|
124
124
|
|
data/bin/adlint_cma
CHANGED
@@ -45,9 +45,9 @@ $:.unshift($libdir.to_s)
|
|
45
45
|
|
46
46
|
require "adlint"
|
47
47
|
|
48
|
-
|
48
|
+
$version = "AdLint cross module analyzer #{AdLint::VERSION}"
|
49
49
|
|
50
|
-
|
50
|
+
$usage = <<EOS
|
51
51
|
Usage: adlint_cma [options] sma-metric-file...
|
52
52
|
Options:
|
53
53
|
-t FILE, --traits FILE Use FILE as traits file (mandatory)
|
@@ -83,7 +83,7 @@ begin
|
|
83
83
|
when "--verbose"
|
84
84
|
verbose = true
|
85
85
|
when "--version"
|
86
|
-
puts
|
86
|
+
puts $version, AdLint::AUTHOR
|
87
87
|
exit 0
|
88
88
|
when "--copyright"
|
89
89
|
puts AdLint::COPYRIGHT
|
@@ -92,12 +92,12 @@ begin
|
|
92
92
|
puts $prefix
|
93
93
|
exit 0
|
94
94
|
when "--help"
|
95
|
-
puts
|
95
|
+
puts $usage
|
96
96
|
exit 0
|
97
97
|
end
|
98
98
|
end
|
99
99
|
rescue
|
100
|
-
$stderr.puts
|
100
|
+
$stderr.puts $usage
|
101
101
|
exit 1
|
102
102
|
end
|
103
103
|
|
@@ -105,13 +105,13 @@ fpaths = ARGV.map { |str| Pathname.new(str) }
|
|
105
105
|
|
106
106
|
if fpaths.empty?
|
107
107
|
$stderr.puts "#{File.basename(__FILE__)}: no input files"
|
108
|
-
$stderr.puts
|
108
|
+
$stderr.puts $usage
|
109
109
|
exit 1
|
110
110
|
end
|
111
111
|
|
112
112
|
unless traits_fpath
|
113
113
|
$stderr.puts "#{File.basename(__FILE__)}: no traits file"
|
114
|
-
$stderr.puts
|
114
|
+
$stderr.puts $usage
|
115
115
|
exit 1
|
116
116
|
end
|
117
117
|
|
data/bin/adlint_sma
CHANGED
@@ -45,9 +45,9 @@ $:.unshift($libdir.to_s)
|
|
45
45
|
|
46
46
|
require "adlint"
|
47
47
|
|
48
|
-
|
48
|
+
$version = "AdLint single module analyzer #{AdLint::VERSION}"
|
49
49
|
|
50
|
-
|
50
|
+
$usage = <<EOS
|
51
51
|
Usage: adlint_sma [options] source-file...
|
52
52
|
Options:
|
53
53
|
-t FILE, --traits FILE Use FILE as traits file (mandatory)
|
@@ -90,7 +90,7 @@ begin
|
|
90
90
|
when "--verbose"
|
91
91
|
verbose = true
|
92
92
|
when "--version"
|
93
|
-
puts
|
93
|
+
puts $version, AdLint::AUTHOR
|
94
94
|
exit 0
|
95
95
|
when "--copyright"
|
96
96
|
puts AdLint::COPYRIGHT
|
@@ -99,12 +99,12 @@ begin
|
|
99
99
|
puts $prefix
|
100
100
|
exit 0
|
101
101
|
when "--help"
|
102
|
-
puts
|
102
|
+
puts $usage
|
103
103
|
exit 0
|
104
104
|
end
|
105
105
|
end
|
106
106
|
rescue
|
107
|
-
$stderr.puts
|
107
|
+
$stderr.puts $usage
|
108
108
|
exit 1
|
109
109
|
end
|
110
110
|
|
@@ -112,13 +112,13 @@ fpaths = ARGV.map { |str| Pathname.new(str) }
|
|
112
112
|
|
113
113
|
if fpaths.empty?
|
114
114
|
$stderr.puts "#{File.basename(__FILE__)}: no input files"
|
115
|
-
$stderr.puts
|
115
|
+
$stderr.puts $usage
|
116
116
|
exit 1
|
117
117
|
end
|
118
118
|
|
119
119
|
unless traits_fpath
|
120
120
|
$stderr.puts "#{File.basename(__FILE__)}: no traits file"
|
121
|
-
$stderr.puts
|
121
|
+
$stderr.puts $usage
|
122
122
|
exit 1
|
123
123
|
end
|
124
124
|
|
data/bin/adlintize
CHANGED
@@ -42,9 +42,9 @@ $:.unshift($libdir.to_s)
|
|
42
42
|
|
43
43
|
require "adlint"
|
44
44
|
|
45
|
-
|
45
|
+
$version = "AdLint project generator #{AdLint::VERSION}"
|
46
46
|
|
47
|
-
|
47
|
+
$usage = <<EOS
|
48
48
|
Usage: adlintize [options] [project-name]
|
49
49
|
Options:
|
50
50
|
-t FILE, --traits FILE Write traits to FILE
|
@@ -142,7 +142,7 @@ begin
|
|
142
142
|
when "--force"
|
143
143
|
force_overwrite = true
|
144
144
|
when "--version"
|
145
|
-
puts
|
145
|
+
puts $version, AdLint::AUTHOR
|
146
146
|
exit 0
|
147
147
|
when "--copyright"
|
148
148
|
puts AdLint::COPYRIGHT
|
@@ -151,12 +151,12 @@ begin
|
|
151
151
|
puts $prefix
|
152
152
|
exit 0
|
153
153
|
when "--help"
|
154
|
-
puts
|
154
|
+
puts $usage
|
155
155
|
exit 0
|
156
156
|
end
|
157
157
|
end
|
158
158
|
rescue
|
159
|
-
$stderr.puts
|
159
|
+
$stderr.puts $usage
|
160
160
|
exit 1
|
161
161
|
end
|
162
162
|
|