rubocop 0.34.2 → 0.35.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +86 -0
- data/README.md +103 -31
- data/config/default.yml +32 -2
- data/config/disabled.yml +24 -0
- data/config/enabled.yml +20 -2
- data/lib/rubocop.rb +13 -0
- data/lib/rubocop/ast_node.rb +48 -0
- data/lib/rubocop/cli.rb +9 -0
- data/lib/rubocop/config.rb +8 -6
- data/lib/rubocop/config_loader.rb +30 -8
- data/lib/rubocop/cop/commissioner.rb +1 -1
- data/lib/rubocop/cop/cop.rb +19 -6
- data/lib/rubocop/cop/lint/circular_argument_reference.rb +33 -2
- data/lib/rubocop/cop/lint/debugger.rb +9 -56
- data/lib/rubocop/cop/lint/end_alignment.rb +29 -9
- data/lib/rubocop/cop/lint/eval.rb +6 -2
- data/lib/rubocop/cop/lint/format_parameter_mismatch.rb +24 -6
- data/lib/rubocop/cop/lint/literal_in_condition.rb +0 -5
- data/lib/rubocop/cop/lint/non_local_exit_from_iterator.rb +10 -1
- data/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb +1 -1
- data/lib/rubocop/cop/lint/space_before_first_arg.rb +1 -1
- data/lib/rubocop/cop/lint/unused_block_argument.rb +6 -0
- data/lib/rubocop/cop/lint/unused_method_argument.rb +8 -0
- data/lib/rubocop/cop/metrics/abc_size.rb +1 -1
- data/lib/rubocop/cop/mixin/access_modifier_node.rb +1 -1
- data/lib/rubocop/cop/mixin/autocorrect_alignment.rb +1 -1
- data/lib/rubocop/cop/mixin/autocorrect_unless_changing_ast.rb +26 -3
- data/lib/rubocop/cop/mixin/check_assignment.rb +2 -3
- data/lib/rubocop/cop/mixin/configurable_enforced_style.rb +59 -12
- data/lib/rubocop/cop/mixin/configurable_max.rb +1 -1
- data/lib/rubocop/cop/mixin/configurable_naming.rb +1 -1
- data/lib/rubocop/cop/mixin/first_element_line_break.rb +41 -0
- data/lib/rubocop/cop/mixin/negative_conditional.rb +1 -1
- data/lib/rubocop/cop/mixin/safe_assignment.rb +3 -14
- data/lib/rubocop/cop/mixin/statement_modifier.rb +2 -2
- data/lib/rubocop/cop/performance/detect.rb +5 -1
- data/lib/rubocop/cop/performance/fixed_size.rb +50 -0
- data/lib/rubocop/cop/performance/size.rb +1 -1
- data/lib/rubocop/cop/performance/string_replacement.rb +14 -8
- data/lib/rubocop/cop/rails/pluralization_grammar.rb +97 -0
- data/lib/rubocop/cop/style/align_hash.rb +1 -12
- data/lib/rubocop/cop/style/align_parameters.rb +19 -7
- data/lib/rubocop/cop/style/and_or.rb +42 -13
- data/lib/rubocop/cop/style/block_comments.rb +4 -2
- data/lib/rubocop/cop/style/block_delimiters.rb +57 -18
- data/lib/rubocop/cop/style/braces_around_hash_parameters.rb +1 -1
- data/lib/rubocop/cop/style/command_literal.rb +2 -10
- data/lib/rubocop/cop/style/copyright.rb +5 -3
- data/lib/rubocop/cop/style/documentation.rb +9 -6
- data/lib/rubocop/cop/style/dot_position.rb +6 -0
- data/lib/rubocop/cop/style/double_negation.rb +4 -15
- data/lib/rubocop/cop/style/each_with_object.rb +17 -4
- data/lib/rubocop/cop/style/empty_line_between_defs.rb +1 -5
- data/lib/rubocop/cop/style/encoding.rb +10 -4
- data/lib/rubocop/cop/style/extra_spacing.rb +23 -13
- data/lib/rubocop/cop/style/first_array_element_line_break.rb +41 -0
- data/lib/rubocop/cop/style/first_hash_element_line_break.rb +35 -0
- data/lib/rubocop/cop/style/first_method_argument_line_break.rb +37 -0
- data/lib/rubocop/cop/style/first_method_parameter_line_break.rb +42 -0
- data/lib/rubocop/cop/style/for.rb +2 -1
- data/lib/rubocop/cop/style/if_unless_modifier.rb +31 -0
- data/lib/rubocop/cop/style/indent_hash.rb +67 -37
- data/lib/rubocop/cop/style/indentation_width.rb +1 -1
- data/lib/rubocop/cop/style/leading_comment_space.rb +3 -2
- data/lib/rubocop/cop/style/method_call_parentheses.rb +8 -0
- data/lib/rubocop/cop/style/method_def_parentheses.rb +10 -7
- data/lib/rubocop/cop/style/multiline_operation_indentation.rb +8 -13
- data/lib/rubocop/cop/style/nested_modifier.rb +97 -0
- data/lib/rubocop/cop/style/next.rb +18 -0
- data/lib/rubocop/cop/style/parallel_assignment.rb +57 -15
- data/lib/rubocop/cop/style/predicate_name.rb +7 -2
- data/lib/rubocop/cop/style/regexp_literal.rb +2 -10
- data/lib/rubocop/cop/style/single_line_methods.rb +7 -5
- data/lib/rubocop/cop/style/single_space_before_first_arg.rb +1 -1
- data/lib/rubocop/cop/style/space_around_operators.rb +2 -0
- data/lib/rubocop/cop/style/special_global_vars.rb +4 -2
- data/lib/rubocop/cop/style/stabby_lambda_parentheses.rb +108 -0
- data/lib/rubocop/cop/style/trailing_comma.rb +9 -6
- data/lib/rubocop/cop/style/trailing_underscore_variable.rb +23 -2
- data/lib/rubocop/cop/style/unneeded_percent_q.rb +31 -20
- data/lib/rubocop/cop/style/variable_name.rb +5 -0
- data/lib/rubocop/cop/style/word_array.rb +2 -1
- data/lib/rubocop/cop/team.rb +17 -4
- data/lib/rubocop/cop/util.rb +5 -0
- data/lib/rubocop/cop/variable_force/locatable.rb +1 -1
- data/lib/rubocop/formatter/base_formatter.rb +1 -1
- data/lib/rubocop/formatter/disabled_config_formatter.rb +22 -10
- data/lib/rubocop/formatter/simple_text_formatter.rb +1 -1
- data/lib/rubocop/node_pattern.rb +390 -0
- data/lib/rubocop/options.rb +48 -36
- data/lib/rubocop/processed_source.rb +3 -1
- data/lib/rubocop/rake_task.rb +1 -1
- data/lib/rubocop/remote_config.rb +60 -0
- data/lib/rubocop/result_cache.rb +4 -2
- data/lib/rubocop/runner.rb +33 -10
- data/lib/rubocop/token.rb +2 -1
- data/lib/rubocop/version.rb +1 -1
- data/lib/rubocop/warning.rb +11 -0
- data/relnotes/v0.35.0.md +210 -0
- data/rubocop.gemspec +2 -2
- metadata +20 -6
data/rubocop.gemspec
CHANGED
@@ -39,10 +39,10 @@ Gem::Specification.new do |s|
|
|
39
39
|
s.summary = 'Automatic Ruby code style checking tool.'
|
40
40
|
|
41
41
|
s.add_runtime_dependency('rainbow', '>= 1.99.1', '< 3.0')
|
42
|
-
s.add_runtime_dependency('parser', '>= 2.2.
|
42
|
+
s.add_runtime_dependency('parser', '>= 2.2.3.0', '< 3.0')
|
43
43
|
s.add_runtime_dependency('powerpack', '~> 0.1')
|
44
44
|
s.add_runtime_dependency('astrolabe', '~> 1.3')
|
45
|
-
s.add_runtime_dependency('ruby-progressbar', '~> 1.
|
45
|
+
s.add_runtime_dependency('ruby-progressbar', '~> 1.7')
|
46
46
|
s.add_development_dependency('rake', '~> 10.1')
|
47
47
|
s.add_development_dependency('rspec', '~> 3.3.0')
|
48
48
|
s.add_development_dependency('yard', '~> 0.8')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.35.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bozhidar Batsov
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-
|
13
|
+
date: 2015-11-07 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rainbow
|
@@ -38,7 +38,7 @@ dependencies:
|
|
38
38
|
requirements:
|
39
39
|
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 2.2.
|
41
|
+
version: 2.2.3.0
|
42
42
|
- - "<"
|
43
43
|
- !ruby/object:Gem::Version
|
44
44
|
version: '3.0'
|
@@ -48,7 +48,7 @@ dependencies:
|
|
48
48
|
requirements:
|
49
49
|
- - ">="
|
50
50
|
- !ruby/object:Gem::Version
|
51
|
-
version: 2.2.
|
51
|
+
version: 2.2.3.0
|
52
52
|
- - "<"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '1.
|
89
|
+
version: '1.7'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '1.
|
96
|
+
version: '1.7'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rake
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -187,6 +187,7 @@ files:
|
|
187
187
|
- config/disabled.yml
|
188
188
|
- config/enabled.yml
|
189
189
|
- lib/rubocop.rb
|
190
|
+
- lib/rubocop/ast_node.rb
|
190
191
|
- lib/rubocop/cli.rb
|
191
192
|
- lib/rubocop/comment_config.rb
|
192
193
|
- lib/rubocop/config.rb
|
@@ -265,6 +266,7 @@ files:
|
|
265
266
|
- lib/rubocop/cop/mixin/configurable_naming.rb
|
266
267
|
- lib/rubocop/cop/mixin/empty_lines_around_body.rb
|
267
268
|
- lib/rubocop/cop/mixin/end_keyword_alignment.rb
|
269
|
+
- lib/rubocop/cop/mixin/first_element_line_break.rb
|
268
270
|
- lib/rubocop/cop/mixin/if_node.rb
|
269
271
|
- lib/rubocop/cop/mixin/method_complexity.rb
|
270
272
|
- lib/rubocop/cop/mixin/method_preference.rb
|
@@ -287,6 +289,7 @@ files:
|
|
287
289
|
- lib/rubocop/cop/performance/case_when_splat.rb
|
288
290
|
- lib/rubocop/cop/performance/count.rb
|
289
291
|
- lib/rubocop/cop/performance/detect.rb
|
292
|
+
- lib/rubocop/cop/performance/fixed_size.rb
|
290
293
|
- lib/rubocop/cop/performance/flat_map.rb
|
291
294
|
- lib/rubocop/cop/performance/reverse_each.rb
|
292
295
|
- lib/rubocop/cop/performance/sample.rb
|
@@ -300,6 +303,7 @@ files:
|
|
300
303
|
- lib/rubocop/cop/rails/find_each.rb
|
301
304
|
- lib/rubocop/cop/rails/has_and_belongs_to_many.rb
|
302
305
|
- lib/rubocop/cop/rails/output.rb
|
306
|
+
- lib/rubocop/cop/rails/pluralization_grammar.rb
|
303
307
|
- lib/rubocop/cop/rails/read_write_attribute.rb
|
304
308
|
- lib/rubocop/cop/rails/scope_args.rb
|
305
309
|
- lib/rubocop/cop/rails/time_zone.rb
|
@@ -361,6 +365,10 @@ files:
|
|
361
365
|
- lib/rubocop/cop/style/even_odd.rb
|
362
366
|
- lib/rubocop/cop/style/extra_spacing.rb
|
363
367
|
- lib/rubocop/cop/style/file_name.rb
|
368
|
+
- lib/rubocop/cop/style/first_array_element_line_break.rb
|
369
|
+
- lib/rubocop/cop/style/first_hash_element_line_break.rb
|
370
|
+
- lib/rubocop/cop/style/first_method_argument_line_break.rb
|
371
|
+
- lib/rubocop/cop/style/first_method_parameter_line_break.rb
|
364
372
|
- lib/rubocop/cop/style/first_parameter_indentation.rb
|
365
373
|
- lib/rubocop/cop/style/flip_flop.rb
|
366
374
|
- lib/rubocop/cop/style/for.rb
|
@@ -395,6 +403,7 @@ files:
|
|
395
403
|
- lib/rubocop/cop/style/mutable_constant.rb
|
396
404
|
- lib/rubocop/cop/style/negated_if.rb
|
397
405
|
- lib/rubocop/cop/style/negated_while.rb
|
406
|
+
- lib/rubocop/cop/style/nested_modifier.rb
|
398
407
|
- lib/rubocop/cop/style/nested_ternary_operator.rb
|
399
408
|
- lib/rubocop/cop/style/next.rb
|
400
409
|
- lib/rubocop/cop/style/nil_comparison.rb
|
@@ -449,6 +458,7 @@ files:
|
|
449
458
|
- lib/rubocop/cop/style/space_inside_range_literal.rb
|
450
459
|
- lib/rubocop/cop/style/space_inside_string_interpolation.rb
|
451
460
|
- lib/rubocop/cop/style/special_global_vars.rb
|
461
|
+
- lib/rubocop/cop/style/stabby_lambda_parentheses.rb
|
452
462
|
- lib/rubocop/cop/style/string_literals.rb
|
453
463
|
- lib/rubocop/cop/style/string_literals_in_interpolation.rb
|
454
464
|
- lib/rubocop/cop/style/string_methods.rb
|
@@ -495,16 +505,19 @@ files:
|
|
495
505
|
- lib/rubocop/formatter/progress_formatter.rb
|
496
506
|
- lib/rubocop/formatter/simple_text_formatter.rb
|
497
507
|
- lib/rubocop/formatter/text_util.rb
|
508
|
+
- lib/rubocop/node_pattern.rb
|
498
509
|
- lib/rubocop/options.rb
|
499
510
|
- lib/rubocop/path_util.rb
|
500
511
|
- lib/rubocop/processed_source.rb
|
501
512
|
- lib/rubocop/rake_task.rb
|
513
|
+
- lib/rubocop/remote_config.rb
|
502
514
|
- lib/rubocop/result_cache.rb
|
503
515
|
- lib/rubocop/runner.rb
|
504
516
|
- lib/rubocop/string_util.rb
|
505
517
|
- lib/rubocop/target_finder.rb
|
506
518
|
- lib/rubocop/token.rb
|
507
519
|
- lib/rubocop/version.rb
|
520
|
+
- lib/rubocop/warning.rb
|
508
521
|
- logo/rubo-logo-horizontal.png
|
509
522
|
- logo/rubo-logo-square.png
|
510
523
|
- logo/rubo-logo-symbol.png
|
@@ -534,6 +547,7 @@ files:
|
|
534
547
|
- relnotes/v0.34.0.md
|
535
548
|
- relnotes/v0.34.1.md
|
536
549
|
- relnotes/v0.34.2.md
|
550
|
+
- relnotes/v0.35.0.md
|
537
551
|
- rubocop.gemspec
|
538
552
|
homepage: http://github.com/bbatsov/rubocop
|
539
553
|
licenses:
|