rubocop 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rubocop might be problematic. Click here for more details.

@@ -0,0 +1,50 @@
1
+ # rcov generated
2
+ coverage
3
+ coverage.data
4
+
5
+ # rdoc generated
6
+ rdoc
7
+
8
+ # yard generated
9
+ doc
10
+ .yardoc
11
+
12
+ # bundler
13
+ .bundle
14
+ Gemfile.lock
15
+
16
+ # jeweler generated
17
+ pkg
18
+
19
+ # Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
20
+ #
21
+ # * Create a file at ~/.gitignore
22
+ # * Include files you want ignored
23
+ # * Run: git config --global core.excludesfile ~/.gitignore
24
+ #
25
+ # After doing this, these files will be ignored in all your git projects,
26
+ # saving you from having to 'pollute' every project you touch with them
27
+ #
28
+ # Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
29
+ #
30
+ # For MacOS:
31
+ #
32
+ #.DS_Store
33
+
34
+ # For TextMate
35
+ #*.tmproj
36
+ #tmtags
37
+
38
+ # For emacs:
39
+ #*~
40
+ #\#*
41
+ #.\#*
42
+
43
+ # For vim:
44
+ #*.swp
45
+
46
+ # For redcar:
47
+ #.redcar
48
+
49
+ # For rubinius:
50
+ #*.rbc
@@ -6,6 +6,12 @@
6
6
 
7
7
  ### Bugs fixed
8
8
 
9
+ ## 0.7.1 (05/11/2013)
10
+
11
+ ### Bugs fixed
12
+
13
+ * Added missing files to the gemspec
14
+
9
15
  ## 0.7.0 (05/11/2013)
10
16
 
11
17
  ### New features
@@ -0,0 +1,38 @@
1
+ # This is the default configuration file. Enabling and disabling is configured
2
+ # in separate files. This file adds all other parameters apart from Enabled.
3
+
4
+ inherit_from:
5
+ - enabled.yml
6
+ - disabled.yml
7
+
8
+ # Common configuration.
9
+ AllCops:
10
+ # Include gemspec and Rakefile
11
+ Includes:
12
+ - '**/*.gemspec'
13
+ - '**/Rakefile'
14
+ Excludes: []
15
+
16
+ # Limit lines to 79 characters.
17
+ LineLength:
18
+ Max: 79
19
+
20
+ # Avoid methods longer than 10 lines of code
21
+ MethodLength:
22
+ CountComments: false # count full line comments?
23
+ Max: 10
24
+
25
+ # Don't use semicolons to terminate expressions.
26
+ Semicolon:
27
+ # For example; def area(height, width); height * width end
28
+ AllowAfterParameterListInOneLineMethods: false
29
+ # For example; def area(height, width) height * width; end
30
+ AllowBeforeEndInOneLineMethods: true
31
+
32
+ # Avoid single-line methods.
33
+ SingleLineMethods:
34
+ AllowIfMethodIsEmpty: true
35
+
36
+ # Use spaces inside hash literal braces - or don't.
37
+ SpaceInsideHashLiteralBraces:
38
+ EnforcedStyleIsWithSpaces: true
@@ -0,0 +1,5 @@
1
+ # These are all the cops that are disabled in the default configuration.
2
+
3
+ # Use %i or %I for arrays of symbols.
4
+ SymbolArray:
5
+ Enabled: false
@@ -0,0 +1,325 @@
1
+ # These are all the cops that are enabled in the default configuration.
2
+
3
+ # Use UTF-8 as the source file encoding.
4
+ Encoding:
5
+ Enabled: true
6
+
7
+ # Limit lines to 80 characters.
8
+ LineLength:
9
+ Enabled: true
10
+
11
+ # Avoid methods longer than 10 lines of code
12
+ MethodLength:
13
+ Enabled: true
14
+
15
+ # No hard tabs.
16
+ Tab:
17
+ Enabled: true
18
+
19
+ # Avoid trailing whitespace.
20
+ TrailingWhitespace:
21
+ Enabled: true
22
+
23
+ # Indent when as deep as case.
24
+ CaseIndentation:
25
+ Enabled: true
26
+
27
+ # Use empty lines between defs.
28
+ EmptyLineBetweenDefs:
29
+ Enabled: true
30
+
31
+ # Don't use several empty lines in a row.
32
+ EmptyLines:
33
+ Enabled: true
34
+
35
+ # Use spaces around operators.
36
+ SpaceAroundOperators:
37
+ Enabled: true
38
+
39
+ # Use spaces around { and before }.
40
+ SpaceAroundBraces:
41
+ Enabled: true
42
+
43
+ # No spaces after ( or before ).
44
+ SpaceInsideParens:
45
+ Enabled: true
46
+
47
+ # No spaces after [ or before ].
48
+ SpaceInsideBrackets:
49
+ Enabled: true
50
+
51
+ # Use spaces after commas.
52
+ SpaceAfterComma:
53
+ Enabled: true
54
+
55
+ # Use spaces after semicolons.
56
+ SpaceAfterSemicolon:
57
+ Enabled: true
58
+
59
+ # Use spaces after colons.
60
+ SpaceAfterColon:
61
+ Enabled: true
62
+
63
+ # Use spaces after if/elsif/unless/while/until/case/when.
64
+ SpaceAfterControlKeyword:
65
+ Enabled: true
66
+
67
+ # Prefer symbols instead of strings as hash keys.
68
+ HashSyntax:
69
+ Enabled: true
70
+
71
+ # Use Unix-style line endings.
72
+ EndOfLine:
73
+ Enabled: true
74
+
75
+ # Add underscores to large numeric literals to improve their readability.
76
+ NumericLiterals:
77
+ Enabled: true
78
+
79
+ # Align the parameters of a method call if they span more than one line.
80
+ AlignParameters:
81
+ Enabled: true
82
+
83
+ # Use def with parentheses when there are arguments.
84
+ DefWithParentheses:
85
+ Enabled: true
86
+
87
+ # Omit the parentheses when the method doesn't accept any arguments.
88
+ DefWithoutParentheses:
89
+ Enabled: true
90
+
91
+ # Never use if x; .... Use the ternary operator instead.
92
+ IfWithSemicolon:
93
+ Enabled: true
94
+
95
+ # Never use then for multi-line if/unless.
96
+ MultilineIfThen:
97
+ Enabled: true
98
+
99
+ # Favor the ternary operator(?:) over if/then/else/end constructs.
100
+ OneLineConditional:
101
+ Enabled: true
102
+
103
+ # Avoid using {...} for multi-line blocks (multiline chaining is always ugly).
104
+ MultilineBlocks:
105
+ Enabled: true
106
+
107
+ # Prefer {...} over do...end for single-line blocks.
108
+ SingleLineBlocks:
109
+ Enabled: true
110
+
111
+ # Avoid parameter lists longer than three or four parameters.
112
+ ParameterLists:
113
+ Enabled: true
114
+
115
+ # Prefer ' strings when you don't need string interpolation or special symbols.
116
+ StringLiterals:
117
+ Enabled: true
118
+
119
+ # Avoid multi-line ?: (the ternary operator); use if/unless instead.
120
+ MultilineTernaryOperator:
121
+ Enabled: true
122
+
123
+ # Use one expression per branch in a ternary operator.
124
+ NestedTernaryOperator:
125
+ Enabled: true
126
+
127
+ # Never use unless with else. Rewrite these with the positive case first.
128
+ UnlessElse:
129
+ Enabled: true
130
+
131
+ # Use &&/|| for boolean expressions, and/or for control flow.
132
+ AmpersandsPipesVsAndOr:
133
+ Enabled: true
134
+
135
+ # Use when x then ... for one-line cases.
136
+ WhenThen:
137
+ Enabled: true
138
+
139
+ # Favor modifier if/unless usage when you have a single-line body.
140
+ IfUnlessModifier:
141
+ Enabled: true
142
+
143
+ # Favor modifier while/until usage when you have a single-line body.
144
+ WhileUntilModifier:
145
+ Enabled: true
146
+
147
+ # Favor unless over if for negative conditions (or control flow or).
148
+ FavorUnlessOverNegatedIf:
149
+ Enabled: true
150
+
151
+ # Favor until over while for negative conditions.
152
+ FavorUntilOverNegatedWhile:
153
+ Enabled: true
154
+
155
+ # Use spaces around the = operator when assigning default values in def params.
156
+ SpaceAroundEqualsInParameterDefault:
157
+ Enabled: true
158
+
159
+ # Use the new lambda literal syntax.
160
+ NewLambdaLiteral:
161
+ Enabled: true
162
+
163
+ # Don't use parentheses around the condition of an if/unless/while.
164
+ ParenthesesAroundCondition:
165
+ Enabled: true
166
+
167
+ # Use snake_case for symbols, methods and variables.
168
+ MethodAndVariableSnakeCase:
169
+ Enabled: true
170
+
171
+ # Use CamelCase for classes and modules.
172
+ ClassAndModuleCamelCase:
173
+ Enabled: true
174
+
175
+ # Causes Ruby to check the syntax of the script and exit without executing.
176
+ Syntax:
177
+ Enabled: true
178
+
179
+ # Preferred collection methods.
180
+ CollectionMethods:
181
+ Enabled: true
182
+
183
+ # Prefer each over for.
184
+ AvoidFor:
185
+ Enabled: true
186
+
187
+ # Avoid Perl-style global variables.
188
+ AvoidPerlisms:
189
+ Enabled: true
190
+
191
+ # Avoid Perl-style regex back references.
192
+ AvoidPerlBackrefs:
193
+ Enabled: true
194
+
195
+ # Avoid the use of class variables.
196
+ AvoidClassVars:
197
+ Enabled: true
198
+
199
+ # Symbol literals should use snake_case.
200
+ SymbolSnakeCase:
201
+ Enabled: true
202
+
203
+ # Don't interpolate global, instance and class variables directly in strings.
204
+ VariableInterpolation:
205
+ Enabled: true
206
+
207
+ # Don't use semicolons to terminate expressions.
208
+ Semicolon:
209
+ Enabled: true
210
+
211
+ # Use sprintf instead of String#%.
212
+ FavorSprintf:
213
+ Enabled: true
214
+
215
+ # Use Array#join instead of Array#*.
216
+ FavorJoin:
217
+ Enabled: true
218
+
219
+ # Use alias_method instead of alias.
220
+ Alias:
221
+ Enabled: true
222
+
223
+ # Use ! instead of not.
224
+ Not:
225
+ Enabled: true
226
+
227
+ # Avoid using rescue in its modifier form.
228
+ RescueModifier:
229
+ Enabled: true
230
+
231
+ # Avoid the use of %q, %Q, %s and %x.
232
+ PercentLiterals:
233
+ Enabled: true
234
+
235
+ # Prefer () as delimiters for all % literals.
236
+ BraceAfterPercent:
237
+ Enabled: true
238
+
239
+ # Never use return in an ensure block.
240
+ EnsureReturn:
241
+ Enabled: true
242
+
243
+ # Don't suppress exception.
244
+ HandleExceptions:
245
+ Enabled: true
246
+
247
+ # Use only ascii symbols in identifiers.
248
+ AsciiIdentifiers:
249
+ Enabled: true
250
+
251
+ # Use only ascii symbols in comments.
252
+ AsciiComments:
253
+ Enabled: true
254
+
255
+ # Do not use block comments.
256
+ BlockComments:
257
+ Enabled: true
258
+
259
+ # Avoid rescuing the Exception class.
260
+ RescueException:
261
+ Enabled: true
262
+
263
+ # Prefer array literal to Array.new.
264
+ ArrayLiteral:
265
+ Enabled: true
266
+
267
+ # Prefer hash {} literail to Hash.new.
268
+ HashLiteral:
269
+ Enabled: true
270
+
271
+ # When defining binary operators, name the argument other.
272
+ OpMethod:
273
+ Enabled: true
274
+
275
+ # Name reduce arguments |a, e| (accumulator, element)
276
+ ReduceArguments:
277
+ Enabled: true
278
+
279
+ # Use %r only for regular expressions matching more than one '/' character.
280
+ PercentR:
281
+ Enabled: true
282
+
283
+ # Use %r for regular expressions matching more than one '/' character.
284
+ FavorPercentR:
285
+ Enabled: true
286
+
287
+ # Use self when defining module/class methods.
288
+ ClassMethods:
289
+ Enabled: true
290
+
291
+ # Avoid single-line methods.
292
+ SingleLineMethods:
293
+ Enabled: true
294
+
295
+ # Use %w or %W for arrays of words.
296
+ WordArray:
297
+ Enabled: true
298
+
299
+ # Use spaces inside hash literal braces - or don't.
300
+ SpaceInsideHashLiteralBraces:
301
+ Enabled: true
302
+
303
+ # Avoid the use of line continuation (/).
304
+ LineContinuation:
305
+ Enabled: true
306
+
307
+ # Prefer attr_* methods to trivial readers/writers.
308
+ TrivialAccessors:
309
+ Enabled: true
310
+
311
+ # Comments should start with a space.
312
+ LeadingCommentSpace:
313
+ Enabled: true
314
+
315
+ # Do not use :: for method invocation.
316
+ ColonMethodCall:
317
+ Enabled: true
318
+
319
+ # Do not introduce global variables.
320
+ AvoidGlobalVars:
321
+ Enabled: true
322
+
323
+ # The use of eval represents a serious security risk.
324
+ Eval:
325
+ Enabled: true
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Rubocop
4
4
  module Version
5
- STRING = '0.7.0'
5
+ STRING = '0.7.1'
6
6
  end
7
7
  end
@@ -1,6 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  $LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
3
3
  require 'rubocop/version'
4
+ require 'English'
4
5
 
5
6
  Gem::Specification.new do |s|
6
7
  s.name = 'rubocop'
@@ -15,22 +16,10 @@ Gem::Specification.new do |s|
15
16
  EOF
16
17
 
17
18
  s.email = 'bozhidar@batsov.com'
18
- s.executables = ['rubocop']
19
+ s.files = `git ls-files`.split($RS)
20
+ s.test_files = s.files.grep(/^spec\//)
21
+ s.executables = s.files.grep(/^bin\//) { |f| File.basename(f) }
19
22
  s.extra_rdoc_files = ['LICENSE.txt', 'README.md']
20
- s.files = ['.document',
21
- '.rspec',
22
- '.rubocop.yml',
23
- '.travis.yml',
24
- 'CHANGELOG.md',
25
- 'CONTRIBUTING.md',
26
- 'Gemfile',
27
- 'LICENSE.txt',
28
- 'README.md',
29
- 'Rakefile',
30
- 'bin/rubocop',
31
- 'rubocop.gemspec'] + Dir['lib/**/*.rb']
32
-
33
- s.test_files = Dir['spec/**/*.rb']
34
23
  s.homepage = 'http://github.com/bbatsov/rubocop'
35
24
  s.licenses = ['MIT']
36
25
  s.require_paths = ['lib']
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Bozhidar Batsov
@@ -13,20 +14,23 @@ dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: rainbow
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
- - - '>='
19
+ - - ! '>='
18
20
  - !ruby/object:Gem::Version
19
21
  version: 1.1.4
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
- - - '>='
27
+ - - ! '>='
25
28
  - !ruby/object:Gem::Version
26
29
  version: 1.1.4
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: rake
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
35
  - - ~>
32
36
  - !ruby/object:Gem::Version
@@ -34,6 +38,7 @@ dependencies:
34
38
  type: :development
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
43
  - - ~>
39
44
  - !ruby/object:Gem::Version
@@ -41,6 +46,7 @@ dependencies:
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: rspec
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
51
  - - ~>
46
52
  - !ruby/object:Gem::Version
@@ -48,6 +54,7 @@ dependencies:
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
59
  - - ~>
53
60
  - !ruby/object:Gem::Version
@@ -55,6 +62,7 @@ dependencies:
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: yard
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
67
  - - ~>
60
68
  - !ruby/object:Gem::Version
@@ -62,6 +70,7 @@ dependencies:
62
70
  type: :development
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
75
  - - ~>
67
76
  - !ruby/object:Gem::Version
@@ -69,6 +78,7 @@ dependencies:
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: bundler
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
83
  - - ~>
74
84
  - !ruby/object:Gem::Version
@@ -76,6 +86,7 @@ dependencies:
76
86
  type: :development
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
91
  - - ~>
81
92
  - !ruby/object:Gem::Version
@@ -83,6 +94,7 @@ dependencies:
83
94
  - !ruby/object:Gem::Dependency
84
95
  name: simplecov
85
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
86
98
  requirements:
87
99
  - - ~>
88
100
  - !ruby/object:Gem::Version
@@ -90,13 +102,13 @@ dependencies:
90
102
  type: :development
91
103
  prerelease: false
92
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
93
106
  requirements:
94
107
  - - ~>
95
108
  - !ruby/object:Gem::Version
96
109
  version: '0.7'
97
- description: |2
98
- Automatic Ruby code style checking tool.
99
- Aims to enforce the community-driven Ruby Style Guide.
110
+ description: ! " Automatic Ruby code style checking tool.\n Aims to enforce
111
+ the community-driven Ruby Style Guide.\n"
100
112
  email: bozhidar@batsov.com
101
113
  executables:
102
114
  - rubocop
@@ -106,6 +118,7 @@ extra_rdoc_files:
106
118
  - README.md
107
119
  files:
108
120
  - .document
121
+ - .gitignore
109
122
  - .rspec
110
123
  - .rubocop.yml
111
124
  - .travis.yml
@@ -116,7 +129,10 @@ files:
116
129
  - README.md
117
130
  - Rakefile
118
131
  - bin/rubocop
119
- - rubocop.gemspec
132
+ - config/default.yml
133
+ - config/disabled.yml
134
+ - config/enabled.yml
135
+ - lib/rubocop.rb
120
136
  - lib/rubocop/cli.rb
121
137
  - lib/rubocop/config.rb
122
138
  - lib/rubocop/config_store.rb
@@ -195,7 +211,7 @@ files:
195
211
  - lib/rubocop/report/plain_text.rb
196
212
  - lib/rubocop/report/report.rb
197
213
  - lib/rubocop/version.rb
198
- - lib/rubocop.rb
214
+ - rubocop.gemspec
199
215
  - spec/project_spec.rb
200
216
  - spec/rubocop/cli_spec.rb
201
217
  - spec/rubocop/config_spec.rb
@@ -291,26 +307,30 @@ files:
291
307
  homepage: http://github.com/bbatsov/rubocop
292
308
  licenses:
293
309
  - MIT
294
- metadata: {}
295
310
  post_install_message:
296
311
  rdoc_options: []
297
312
  require_paths:
298
313
  - lib
299
314
  required_ruby_version: !ruby/object:Gem::Requirement
315
+ none: false
300
316
  requirements:
301
- - - '>='
317
+ - - ! '>='
302
318
  - !ruby/object:Gem::Version
303
319
  version: 1.9.2
304
320
  required_rubygems_version: !ruby/object:Gem::Requirement
321
+ none: false
305
322
  requirements:
306
- - - '>='
323
+ - - ! '>='
307
324
  - !ruby/object:Gem::Version
308
325
  version: '0'
326
+ segments:
327
+ - 0
328
+ hash: 3818294500784627882
309
329
  requirements: []
310
330
  rubyforge_project:
311
- rubygems_version: 2.0.3
331
+ rubygems_version: 1.8.23
312
332
  signing_key:
313
- specification_version: 4
333
+ specification_version: 3
314
334
  summary: Automatic Ruby code style checking tool.
315
335
  test_files:
316
336
  - spec/project_spec.rb
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 821a707cffadfcc5e7996087447ced23fb3d3767
4
- data.tar.gz: 0c2efc8203808c7b7b04fdf94c6c5d587b2fdcaa
5
- SHA512:
6
- metadata.gz: 19fab984add9357970945fd82006ac71069958b117979b0fef6d3aade60111eec6c10d213e73a82a180a3cf87225d2a4db6341827f36d556b57570a4147c6613
7
- data.tar.gz: 6c222ea27957f3cb861fd3ccf31a0795a8a8cd46b0e2d5712aa0d5bebe92a5cfa442f275599ab7810d739019941a4f2cc961c2269548dfa13fd0d7e1744ee391