rubocop 0.21.0 → 0.22.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.

Files changed (159) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -1
  3. data/{rubocop-todo.yml → .rubocop_todo.yml} +5 -5
  4. data/CHANGELOG.md +41 -0
  5. data/README.md +21 -11
  6. data/config/default.yml +33 -10
  7. data/config/disabled.yml +0 -4
  8. data/config/enabled.yml +27 -1
  9. data/lib/rubocop.rb +17 -1
  10. data/lib/rubocop/config.rb +32 -27
  11. data/lib/rubocop/config_loader.rb +21 -8
  12. data/lib/rubocop/cop/cop.rb +8 -8
  13. data/lib/rubocop/cop/lint/block_alignment.rb +22 -22
  14. data/lib/rubocop/cop/lint/condition_position.rb +3 -5
  15. data/lib/rubocop/cop/lint/debugger.rb +4 -5
  16. data/lib/rubocop/cop/lint/end_alignment.rb +11 -10
  17. data/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb +10 -11
  18. data/lib/rubocop/cop/lint/require_parentheses.rb +7 -7
  19. data/lib/rubocop/cop/lint/rescue_exception.rb +3 -3
  20. data/lib/rubocop/cop/lint/string_conversion_in_interpolation.rb +6 -7
  21. data/lib/rubocop/cop/lint/unreachable_code.rb +2 -3
  22. data/lib/rubocop/cop/lint/unused_block_argument.rb +2 -15
  23. data/lib/rubocop/cop/lint/unused_method_argument.rb +2 -14
  24. data/lib/rubocop/cop/lint/useless_comparison.rb +4 -5
  25. data/lib/rubocop/cop/lint/void.rb +6 -8
  26. data/lib/rubocop/cop/mixin/autocorrect_alignment.rb +4 -2
  27. data/lib/rubocop/cop/mixin/autocorrect_unless_changing_ast.rb +1 -3
  28. data/lib/rubocop/cop/mixin/code_length.rb +5 -5
  29. data/lib/rubocop/cop/mixin/negative_conditional.rb +6 -6
  30. data/lib/rubocop/cop/mixin/percent_literal.rb +2 -3
  31. data/lib/rubocop/cop/mixin/space_after_punctuation.rb +5 -5
  32. data/lib/rubocop/cop/mixin/space_inside.rb +10 -11
  33. data/lib/rubocop/cop/mixin/unused_argument.rb +35 -0
  34. data/lib/rubocop/cop/offense.rb +1 -1
  35. data/lib/rubocop/cop/rails/action_filter.rb +6 -8
  36. data/lib/rubocop/cop/rails/default_scope.rb +2 -4
  37. data/lib/rubocop/cop/rails/delegate.rb +2 -0
  38. data/lib/rubocop/cop/rails/has_and_belongs_to_many.rb +2 -3
  39. data/lib/rubocop/cop/rails/output.rb +2 -3
  40. data/lib/rubocop/cop/rails/read_write_attribute.rb +3 -4
  41. data/lib/rubocop/cop/rails/validation.rb +2 -3
  42. data/lib/rubocop/cop/style/alias.rb +3 -3
  43. data/lib/rubocop/cop/style/align_hash.rb +4 -4
  44. data/lib/rubocop/cop/style/align_parameters.rb +13 -1
  45. data/lib/rubocop/cop/style/and_or.rb +2 -5
  46. data/lib/rubocop/cop/style/array_join.rb +3 -4
  47. data/lib/rubocop/cop/style/ascii_identifiers.rb +2 -3
  48. data/lib/rubocop/cop/style/block_comments.rb +2 -3
  49. data/lib/rubocop/cop/style/block_nesting.rb +2 -3
  50. data/lib/rubocop/cop/style/blocks.rb +9 -9
  51. data/lib/rubocop/cop/style/braces_around_hash_parameters.rb +5 -5
  52. data/lib/rubocop/cop/style/class_and_module_children.rb +1 -1
  53. data/lib/rubocop/cop/style/class_methods.rb +3 -5
  54. data/lib/rubocop/cop/style/collection_methods.rb +8 -11
  55. data/lib/rubocop/cop/style/comment_annotation.rb +9 -9
  56. data/lib/rubocop/cop/style/comment_indentation.rb +66 -0
  57. data/lib/rubocop/cop/style/constant_name.rb +3 -3
  58. data/lib/rubocop/cop/style/cyclomatic_complexity.rb +5 -5
  59. data/lib/rubocop/cop/style/deprecated_hash_methods.rb +6 -6
  60. data/lib/rubocop/cop/style/each_with_object.rb +38 -0
  61. data/lib/rubocop/cop/style/empty_lines.rb +8 -8
  62. data/lib/rubocop/cop/style/empty_lines_around_body.rb +7 -7
  63. data/lib/rubocop/cop/style/encoding.rb +6 -7
  64. data/lib/rubocop/cop/style/end_of_line.rb +10 -10
  65. data/lib/rubocop/cop/style/file_name.rb +11 -7
  66. data/lib/rubocop/cop/style/guard_clause.rb +32 -22
  67. data/lib/rubocop/cop/style/indentation_width.rb +25 -26
  68. data/lib/rubocop/cop/style/lambda.rb +8 -9
  69. data/lib/rubocop/cop/style/leading_comment_space.rb +4 -5
  70. data/lib/rubocop/cop/style/line_end_concatenation.rb +29 -6
  71. data/lib/rubocop/cop/style/line_length.rb +9 -9
  72. data/lib/rubocop/cop/style/method_called_on_do_end_block.rb +7 -6
  73. data/lib/rubocop/cop/style/module_function.rb +3 -4
  74. data/lib/rubocop/cop/style/multiline_if_then.rb +3 -3
  75. data/lib/rubocop/cop/style/negated_if.rb +2 -0
  76. data/lib/rubocop/cop/style/next.rb +80 -0
  77. data/lib/rubocop/cop/style/nil_comparison.rb +2 -3
  78. data/lib/rubocop/cop/style/non_nil_check.rb +15 -3
  79. data/lib/rubocop/cop/style/not.rb +4 -4
  80. data/lib/rubocop/cop/style/numeric_literals.rb +7 -8
  81. data/lib/rubocop/cop/style/op_method.rb +3 -5
  82. data/lib/rubocop/cop/style/parameter_lists.rb +4 -4
  83. data/lib/rubocop/cop/style/parentheses_around_condition.rb +5 -6
  84. data/lib/rubocop/cop/style/percent_literal_delimiters.rb +5 -5
  85. data/lib/rubocop/cop/style/predicate_name.rb +2 -4
  86. data/lib/rubocop/cop/style/redundant_self.rb +11 -12
  87. data/lib/rubocop/cop/style/self_assignment.rb +8 -13
  88. data/lib/rubocop/cop/style/semicolon.rb +16 -19
  89. data/lib/rubocop/cop/style/signal_exception.rb +10 -11
  90. data/lib/rubocop/cop/style/single_line_block_params.rb +2 -3
  91. data/lib/rubocop/cop/style/single_line_methods.rb +3 -4
  92. data/lib/rubocop/cop/style/space_after_colon.rb +9 -9
  93. data/lib/rubocop/cop/style/space_after_control_keyword.rb +3 -3
  94. data/lib/rubocop/cop/style/space_after_method_name.rb +3 -3
  95. data/lib/rubocop/cop/style/space_after_not.rb +3 -4
  96. data/lib/rubocop/cop/style/space_around_operators.rb +5 -4
  97. data/lib/rubocop/cop/style/space_before_comment.rb +29 -0
  98. data/lib/rubocop/cop/style/space_before_modifier_keyword.rb +6 -7
  99. data/lib/rubocop/cop/style/symbol_array.rb +2 -3
  100. data/lib/rubocop/cop/style/tab.rb +8 -8
  101. data/lib/rubocop/cop/style/trailing_blank_lines.rb +10 -10
  102. data/lib/rubocop/cop/style/trailing_whitespace.rb +6 -7
  103. data/lib/rubocop/cop/style/trivial_accessors.rb +3 -4
  104. data/lib/rubocop/cop/style/unless_else.rb +2 -3
  105. data/lib/rubocop/cop/style/unneeded_capital_w.rb +3 -3
  106. data/lib/rubocop/cop/style/unneeded_percent_x.rb +26 -0
  107. data/lib/rubocop/cop/style/when_then.rb +3 -3
  108. data/lib/rubocop/cop/style/while_until_do.rb +3 -6
  109. data/lib/rubocop/cop/style/word_array.rb +8 -7
  110. data/lib/rubocop/cop/team.rb +9 -11
  111. data/lib/rubocop/cop/util.rb +2 -3
  112. data/lib/rubocop/cop/variable_force.rb +2 -3
  113. data/lib/rubocop/cop/variable_force/variable_table.rb +1 -2
  114. data/lib/rubocop/file_inspector.rb +5 -0
  115. data/lib/rubocop/formatter/clang_style_formatter.rb +3 -4
  116. data/lib/rubocop/formatter/disabled_config_formatter.rb +6 -6
  117. data/lib/rubocop/options.rb +14 -11
  118. data/lib/rubocop/target_finder.rb +12 -1
  119. data/lib/rubocop/version.rb +1 -1
  120. data/relnotes/v0.21.0.md +11 -0
  121. data/relnotes/v0.22.0.md +77 -0
  122. data/spec/rubocop/cli_spec.rb +86 -40
  123. data/spec/rubocop/comment_config_spec.rb +1 -1
  124. data/spec/rubocop/config_loader_spec.rb +3 -3
  125. data/spec/rubocop/config_spec.rb +14 -3
  126. data/spec/rubocop/cop/force_spec.rb +1 -1
  127. data/spec/rubocop/cop/lint/unused_block_argument_spec.rb +164 -99
  128. data/spec/rubocop/cop/lint/unused_method_argument_spec.rb +195 -85
  129. data/spec/rubocop/cop/lint/void_spec.rb +8 -0
  130. data/spec/rubocop/cop/rails/delegate_spec.rb +17 -0
  131. data/spec/rubocop/cop/rails/output_spec.rb +3 -3
  132. data/spec/rubocop/cop/severity_spec.rb +5 -5
  133. data/spec/rubocop/cop/style/align_parameters_spec.rb +108 -0
  134. data/spec/rubocop/cop/style/block_nesting_spec.rb +3 -3
  135. data/spec/rubocop/cop/style/class_and_module_children_spec.rb +12 -10
  136. data/spec/rubocop/cop/style/comment_indentation_spec.rb +174 -0
  137. data/spec/rubocop/cop/style/each_with_object_spec.rb +44 -0
  138. data/spec/rubocop/cop/style/end_of_line_spec.rb +3 -5
  139. data/spec/rubocop/cop/style/guard_clause_spec.rb +135 -57
  140. data/spec/rubocop/cop/style/if_unless_modifier_spec.rb +7 -7
  141. data/spec/rubocop/cop/style/line_end_concatenation_spec.rb +75 -1
  142. data/spec/rubocop/cop/style/line_length_spec.rb +7 -7
  143. data/spec/rubocop/cop/style/negated_if_spec.rb +5 -1
  144. data/spec/rubocop/cop/style/next_spec.rb +210 -0
  145. data/spec/rubocop/cop/style/non_nil_check_spec.rb +44 -13
  146. data/spec/rubocop/cop/style/self_assignment_spec.rb +1 -1
  147. data/spec/rubocop/cop/style/space_around_operators_spec.rb +1 -0
  148. data/spec/rubocop/cop/style/space_before_comment_spec.rb +34 -0
  149. data/spec/rubocop/cop/style/unneeded_percent_x_spec.rb +34 -0
  150. data/spec/rubocop/cop/style/while_until_modifier_spec.rb +2 -2
  151. data/spec/rubocop/cop/util_spec.rb +2 -2
  152. data/spec/rubocop/cop/variable_force_spec.rb +1 -1
  153. data/spec/rubocop/formatter/disabled_config_formatter_spec.rb +4 -4
  154. data/spec/rubocop/formatter/disabled_lines_formatter_spec.rb +2 -2
  155. data/spec/rubocop/formatter/offense_count_formatter_spec.rb +2 -2
  156. data/spec/rubocop/options_spec.rb +3 -0
  157. data/spec/support/shared_context.rb +1 -3
  158. data/spec/support/statement_modifier_helper.rb +2 -2
  159. metadata +20 -3
@@ -5,7 +5,7 @@ require 'spec_helper'
5
5
  describe Rubocop::Cop::Style::SelfAssignment do
6
6
  subject(:cop) { described_class.new }
7
7
 
8
- described_class::OPS.product(['x', '@x', '@@x']).each do |op, var|
8
+ [:+, :-, :*, :**, :/, :|, :&].product(['x', '@x', '@@x']).each do |op, var|
9
9
  it "registers an offense for non-shorthand assignment #{op} and #{var}" do
10
10
  inspect_source(cop,
11
11
  ["#{var} = #{var} #{op} y"])
@@ -246,6 +246,7 @@ describe Rubocop::Cop::Style::SpaceAroundOperators do
246
246
 
247
247
  it 'accepts unary operators without space' do
248
248
  inspect_source(cop, ['[].map(&:size)',
249
+ 'a.(b)',
249
250
  '-3',
250
251
  'arr.collect { |e| -e }',
251
252
  'x = +2'])
@@ -0,0 +1,34 @@
1
+ # encoding: utf-8
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Rubocop::Cop::Style::SpaceBeforeComment do
6
+ subject(:cop) { described_class.new }
7
+
8
+ it 'registers an offense for missing space before an EOL comment' do
9
+ inspect_source(cop, ['a += 1# increment'])
10
+ expect(cop.highlights).to eq(['# increment'])
11
+ end
12
+
13
+ it 'accepts an EOL comment with a preceding space' do
14
+ inspect_source(cop, ['a += 1 # increment'])
15
+ expect(cop.offenses).to be_empty
16
+ end
17
+
18
+ it 'accepts a comment that begins a line' do
19
+ inspect_source(cop, ['# comment'])
20
+ expect(cop.offenses).to be_empty
21
+ end
22
+
23
+ it 'accepts a doc comment' do
24
+ inspect_source(cop, ['=begin',
25
+ 'Doc comment',
26
+ '=end'])
27
+ expect(cop.offenses).to be_empty
28
+ end
29
+
30
+ it 'auto-corrects missing space' do
31
+ new_source = autocorrect_source(cop, 'a += 1# increment')
32
+ expect(new_source).to eq('a += 1 # increment')
33
+ end
34
+ end
@@ -0,0 +1,34 @@
1
+ # encoding: utf-8
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Rubocop::Cop::Style::UnneededPercentX do
6
+ subject(:cop) { described_class.new }
7
+
8
+ it 'registers an offense for a %x string without backquotes' do
9
+ inspect_source(cop, '%x(ls)')
10
+ expect(cop.messages)
11
+ .to eq(['Do not use `%x` unless the command string contains ' \
12
+ 'backquotes.'])
13
+ end
14
+
15
+ it 'accepts a %x string with backquotes' do
16
+ inspect_source(cop, '%x(echo `ls`)')
17
+ expect(cop.offenses).to be_empty
18
+ end
19
+
20
+ it 'accepts a `` string without inner backquotes' do
21
+ inspect_source(cop, '`ls`')
22
+ expect(cop.offenses).to be_empty
23
+ end
24
+
25
+ it 'accepts a `` string with inner backquotes' do
26
+ inspect_source(cop, '`echo \`ls\``')
27
+ expect(cop.offenses).to be_empty
28
+ end
29
+
30
+ it 'auto-corrects' do
31
+ new_source = autocorrect_source(cop, '%x(ls)')
32
+ expect(new_source).to eq('`ls`')
33
+ end
34
+ end
@@ -7,7 +7,7 @@ describe Rubocop::Cop::Style::WhileUntilModifier do
7
7
 
8
8
  subject(:cop) { described_class.new(config) }
9
9
  let(:config) do
10
- hash = { 'LineLength' => { 'Max' => 79 } }
10
+ hash = { 'LineLength' => { 'Max' => 80 } }
11
11
  Rubocop::Config.new(hash)
12
12
  end
13
13
 
@@ -77,7 +77,7 @@ describe Rubocop::Cop::Style::WhileUntilModifier do
77
77
  let(:config) do
78
78
  hash = {
79
79
  'LineLength' => { 'Max' => 100 },
80
- 'WhileUntilModifier' => { 'MaxLineLength' => 79 }
80
+ 'WhileUntilModifier' => { 'MaxLineLength' => 80 }
81
81
  }
82
82
  Rubocop::Config.new(hash)
83
83
  end
@@ -34,14 +34,14 @@ describe Rubocop::Cop::Util do
34
34
 
35
35
  context 'when Source::Range object is passed' do
36
36
  it 'returns line range of that' do
37
- line_range = Rubocop::Cop::Util.line_range(node.loc.expression)
37
+ line_range = described_class.line_range(node.loc.expression)
38
38
  expect(line_range).to eq(3..7)
39
39
  end
40
40
  end
41
41
 
42
42
  context 'when AST::Node object is passed' do
43
43
  it 'returns line range of the expression' do
44
- line_range = Rubocop::Cop::Util.line_range(node)
44
+ line_range = described_class.line_range(node)
45
45
  expect(line_range).to eq(3..7)
46
46
  end
47
47
  end
@@ -5,7 +5,7 @@ require 'spec_helper'
5
5
  describe Rubocop::Cop::VariableForce do
6
6
  include AST::Sexp
7
7
 
8
- subject(:force) { Rubocop::Cop::VariableForce.new([]) }
8
+ subject(:force) { described_class.new([]) }
9
9
 
10
10
  describe '#process_node' do
11
11
  before do
@@ -11,7 +11,7 @@ module Rubocop
11
11
  let(:output) do
12
12
  o = StringIO.new
13
13
  def o.path
14
- 'rubocop-todo.yml'
14
+ '.rubocop_todo.yml'
15
15
  end
16
16
  o
17
17
  end
@@ -38,9 +38,9 @@ module Rubocop
38
38
  ' Enabled: false',
39
39
  ''].join("\n"))
40
40
  expect($stdout.string)
41
- .to eq(['Created rubocop-todo.yml.',
42
- 'Run `rubocop --config rubocop-todo.yml`, or',
43
- 'add inherit_from: rubocop-todo.yml in a .rubocop.yml ' \
41
+ .to eq(['Created .rubocop_todo.yml.',
42
+ 'Run `rubocop --config .rubocop_todo.yml`, or',
43
+ 'add inherit_from: .rubocop_todo.yml in a .rubocop.yml ' \
44
44
  'file.',
45
45
  ''].join("\n"))
46
46
  end
@@ -25,7 +25,7 @@ module Rubocop
25
25
 
26
26
  context 'when no disable cop comments are detected' do
27
27
  let(:cop_disabled_line_ranges) { {} }
28
- it 'shouldn\'t add to cop_disabled_line_ranges' do
28
+ it 'does not add to cop_disabled_line_ranges' do
29
29
  expect { file_started }.to_not(
30
30
  change { formatter.cop_disabled_line_ranges })
31
31
  end
@@ -35,7 +35,7 @@ module Rubocop
35
35
  let(:cop_disabled_line_ranges) do
36
36
  { cop_disabled_line_ranges: { 'LineLength' => [1..1] } }
37
37
  end
38
- it 'should merge the changes into cop_disabled_line_ranges' do
38
+ it 'merges the changes into cop_disabled_line_ranges' do
39
39
  expect { file_started }.to(
40
40
  change { formatter.cop_disabled_line_ranges })
41
41
  end
@@ -23,14 +23,14 @@ module Rubocop
23
23
 
24
24
  context 'when no offenses are detected' do
25
25
  let(:offenses) { [] }
26
- it 'shouldn\'t add to offense_counts' do
26
+ it 'does not add to offense_counts' do
27
27
  expect { finish }.to_not change { formatter.offense_counts }
28
28
  end
29
29
  end
30
30
 
31
31
  context 'when any offenses are detected' do
32
32
  let(:offenses) { [double('offense', cop_name: 'OffendedCop')] }
33
- it 'should increment the count for the cop in offense_counts' do
33
+ it 'increments the count for the cop in offense_counts' do
34
34
  expect { finish }.to change { formatter.offense_counts }
35
35
  end
36
36
  end
@@ -65,6 +65,9 @@ Usage: rubocop [options] [file1, file2, ...]
65
65
  --show-cops [COP1,COP2,...] Shows the given cops, or all cops by
66
66
  default, and their configurations for the
67
67
  current directory.
68
+ -F, --fail-fast Inspect files in order of modification
69
+ time and stop after the first file
70
+ containing offenses.
68
71
  -d, --debug Display debug info.
69
72
  -D, --display-cop-names Display cop names in offense messages.
70
73
  -R, --rails Run extra Rails cops.
@@ -8,9 +8,7 @@ shared_context 'config', :config do
8
8
  fail '`config` must be used in `describe SomeCopClass do .. end`'
9
9
  end
10
10
 
11
- unless cop_config.is_a?(Hash)
12
- fail '`cop_config` must be declared with #let'
13
- end
11
+ fail '`cop_config` must be declared with #let' unless cop_config.is_a?(Hash)
14
12
 
15
13
  cop_name = described_class.cop_name
16
14
  hash = {
@@ -19,8 +19,8 @@ module StatementModifierHelper
19
19
  def check_too_long(cop, keyword)
20
20
  # This statement is one character too long to fit.
21
21
  condition = 'a' * (40 - keyword.length)
22
- body = 'b' * 36
23
- expect(" #{body} #{keyword} #{condition}".length).to eq(80)
22
+ body = 'b' * 37
23
+ expect(" #{body} #{keyword} #{condition}".length).to eq(81)
24
24
 
25
25
  inspect_source(cop,
26
26
  [" #{keyword} #{condition}",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.0
4
+ version: 0.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bozhidar Batsov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-24 00:00:00.000000000 Z
11
+ date: 2014-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rainbow
@@ -176,6 +176,7 @@ files:
176
176
  - ".gitignore"
177
177
  - ".rspec"
178
178
  - ".rubocop.yml"
179
+ - ".rubocop_todo.yml"
179
180
  - ".travis.yml"
180
181
  - ".yardopts"
181
182
  - CHANGELOG.md
@@ -256,6 +257,7 @@ files:
256
257
  - lib/rubocop/cop/mixin/statement_modifier.rb
257
258
  - lib/rubocop/cop/mixin/string_help.rb
258
259
  - lib/rubocop/cop/mixin/surrounding_space.rb
260
+ - lib/rubocop/cop/mixin/unused_argument.rb
259
261
  - lib/rubocop/cop/offense.rb
260
262
  - lib/rubocop/cop/rails/action_filter.rb
261
263
  - lib/rubocop/cop/rails/default_scope.rb
@@ -293,6 +295,7 @@ files:
293
295
  - lib/rubocop/cop/style/collection_methods.rb
294
296
  - lib/rubocop/cop/style/colon_method_call.rb
295
297
  - lib/rubocop/cop/style/comment_annotation.rb
298
+ - lib/rubocop/cop/style/comment_indentation.rb
296
299
  - lib/rubocop/cop/style/constant_name.rb
297
300
  - lib/rubocop/cop/style/cyclomatic_complexity.rb
298
301
  - lib/rubocop/cop/style/def_with_parentheses.rb
@@ -300,6 +303,7 @@ files:
300
303
  - lib/rubocop/cop/style/documentation.rb
301
304
  - lib/rubocop/cop/style/dot_position.rb
302
305
  - lib/rubocop/cop/style/double_negation.rb
306
+ - lib/rubocop/cop/style/each_with_object.rb
303
307
  - lib/rubocop/cop/style/empty_line_between_defs.rb
304
308
  - lib/rubocop/cop/style/empty_lines.rb
305
309
  - lib/rubocop/cop/style/empty_lines_around_access_modifier.rb
@@ -339,6 +343,7 @@ files:
339
343
  - lib/rubocop/cop/style/negated_if.rb
340
344
  - lib/rubocop/cop/style/negated_while.rb
341
345
  - lib/rubocop/cop/style/nested_ternary_operator.rb
346
+ - lib/rubocop/cop/style/next.rb
342
347
  - lib/rubocop/cop/style/nil_comparison.rb
343
348
  - lib/rubocop/cop/style/non_nil_check.rb
344
349
  - lib/rubocop/cop/style/not.rb
@@ -373,6 +378,7 @@ files:
373
378
  - lib/rubocop/cop/style/space_around_equals_in_parameter_default.rb
374
379
  - lib/rubocop/cop/style/space_around_operators.rb
375
380
  - lib/rubocop/cop/style/space_before_block_braces.rb
381
+ - lib/rubocop/cop/style/space_before_comment.rb
376
382
  - lib/rubocop/cop/style/space_before_modifier_keyword.rb
377
383
  - lib/rubocop/cop/style/space_inside_block_braces.rb
378
384
  - lib/rubocop/cop/style/space_inside_brackets.rb
@@ -388,6 +394,7 @@ files:
388
394
  - lib/rubocop/cop/style/trivial_accessors.rb
389
395
  - lib/rubocop/cop/style/unless_else.rb
390
396
  - lib/rubocop/cop/style/unneeded_capital_w.rb
397
+ - lib/rubocop/cop/style/unneeded_percent_x.rb
391
398
  - lib/rubocop/cop/style/variable_interpolation.rb
392
399
  - lib/rubocop/cop/style/variable_name.rb
393
400
  - lib/rubocop/cop/style/when_then.rb
@@ -430,7 +437,7 @@ files:
430
437
  - relnotes/v0.20.0.md
431
438
  - relnotes/v0.20.1.md
432
439
  - relnotes/v0.21.0.md
433
- - rubocop-todo.yml
440
+ - relnotes/v0.22.0.md
434
441
  - rubocop.gemspec
435
442
  - spec/.rubocop.yml
436
443
  - spec/isolated_environment_spec.rb
@@ -517,6 +524,7 @@ files:
517
524
  - spec/rubocop/cop/style/collection_methods_spec.rb
518
525
  - spec/rubocop/cop/style/colon_method_call_spec.rb
519
526
  - spec/rubocop/cop/style/comment_annotation_spec.rb
527
+ - spec/rubocop/cop/style/comment_indentation_spec.rb
520
528
  - spec/rubocop/cop/style/constant_name_spec.rb
521
529
  - spec/rubocop/cop/style/cyclomatic_complexity_spec.rb
522
530
  - spec/rubocop/cop/style/def_with_parentheses_spec.rb
@@ -524,6 +532,7 @@ files:
524
532
  - spec/rubocop/cop/style/documentation_spec.rb
525
533
  - spec/rubocop/cop/style/dot_position_spec.rb
526
534
  - spec/rubocop/cop/style/double_negation_spec.rb
535
+ - spec/rubocop/cop/style/each_with_object_spec.rb
527
536
  - spec/rubocop/cop/style/empty_line_between_defs_spec.rb
528
537
  - spec/rubocop/cop/style/empty_lines_around_access_modifier_spec.rb
529
538
  - spec/rubocop/cop/style/empty_lines_around_body_spec.rb
@@ -563,6 +572,7 @@ files:
563
572
  - spec/rubocop/cop/style/negated_if_spec.rb
564
573
  - spec/rubocop/cop/style/negated_while_spec.rb
565
574
  - spec/rubocop/cop/style/nested_ternary_operator_spec.rb
575
+ - spec/rubocop/cop/style/next_spec.rb
566
576
  - spec/rubocop/cop/style/nil_comparison_spec.rb
567
577
  - spec/rubocop/cop/style/non_nil_check_spec.rb
568
578
  - spec/rubocop/cop/style/not_spec.rb
@@ -597,6 +607,7 @@ files:
597
607
  - spec/rubocop/cop/style/space_around_equals_in_parameter_default_spec.rb
598
608
  - spec/rubocop/cop/style/space_around_operators_spec.rb
599
609
  - spec/rubocop/cop/style/space_before_block_braces_spec.rb
610
+ - spec/rubocop/cop/style/space_before_comment_spec.rb
600
611
  - spec/rubocop/cop/style/space_before_modifier_keyword_spec.rb
601
612
  - spec/rubocop/cop/style/space_inside_block_braces_spec.rb
602
613
  - spec/rubocop/cop/style/space_inside_brackets_spec.rb
@@ -612,6 +623,7 @@ files:
612
623
  - spec/rubocop/cop/style/trivial_accessors_spec.rb
613
624
  - spec/rubocop/cop/style/unless_else_spec.rb
614
625
  - spec/rubocop/cop/style/unneeded_capital_w_spec.rb
626
+ - spec/rubocop/cop/style/unneeded_percent_x_spec.rb
615
627
  - spec/rubocop/cop/style/variable_interpolation_spec.rb
616
628
  - spec/rubocop/cop/style/variable_name_spec.rb
617
629
  - spec/rubocop/cop/style/when_then_spec.rb
@@ -764,6 +776,7 @@ test_files:
764
776
  - spec/rubocop/cop/style/collection_methods_spec.rb
765
777
  - spec/rubocop/cop/style/colon_method_call_spec.rb
766
778
  - spec/rubocop/cop/style/comment_annotation_spec.rb
779
+ - spec/rubocop/cop/style/comment_indentation_spec.rb
767
780
  - spec/rubocop/cop/style/constant_name_spec.rb
768
781
  - spec/rubocop/cop/style/cyclomatic_complexity_spec.rb
769
782
  - spec/rubocop/cop/style/def_with_parentheses_spec.rb
@@ -771,6 +784,7 @@ test_files:
771
784
  - spec/rubocop/cop/style/documentation_spec.rb
772
785
  - spec/rubocop/cop/style/dot_position_spec.rb
773
786
  - spec/rubocop/cop/style/double_negation_spec.rb
787
+ - spec/rubocop/cop/style/each_with_object_spec.rb
774
788
  - spec/rubocop/cop/style/empty_line_between_defs_spec.rb
775
789
  - spec/rubocop/cop/style/empty_lines_around_access_modifier_spec.rb
776
790
  - spec/rubocop/cop/style/empty_lines_around_body_spec.rb
@@ -810,6 +824,7 @@ test_files:
810
824
  - spec/rubocop/cop/style/negated_if_spec.rb
811
825
  - spec/rubocop/cop/style/negated_while_spec.rb
812
826
  - spec/rubocop/cop/style/nested_ternary_operator_spec.rb
827
+ - spec/rubocop/cop/style/next_spec.rb
813
828
  - spec/rubocop/cop/style/nil_comparison_spec.rb
814
829
  - spec/rubocop/cop/style/non_nil_check_spec.rb
815
830
  - spec/rubocop/cop/style/not_spec.rb
@@ -844,6 +859,7 @@ test_files:
844
859
  - spec/rubocop/cop/style/space_around_equals_in_parameter_default_spec.rb
845
860
  - spec/rubocop/cop/style/space_around_operators_spec.rb
846
861
  - spec/rubocop/cop/style/space_before_block_braces_spec.rb
862
+ - spec/rubocop/cop/style/space_before_comment_spec.rb
847
863
  - spec/rubocop/cop/style/space_before_modifier_keyword_spec.rb
848
864
  - spec/rubocop/cop/style/space_inside_block_braces_spec.rb
849
865
  - spec/rubocop/cop/style/space_inside_brackets_spec.rb
@@ -859,6 +875,7 @@ test_files:
859
875
  - spec/rubocop/cop/style/trivial_accessors_spec.rb
860
876
  - spec/rubocop/cop/style/unless_else_spec.rb
861
877
  - spec/rubocop/cop/style/unneeded_capital_w_spec.rb
878
+ - spec/rubocop/cop/style/unneeded_percent_x_spec.rb
862
879
  - spec/rubocop/cop/style/variable_interpolation_spec.rb
863
880
  - spec/rubocop/cop/style/variable_name_spec.rb
864
881
  - spec/rubocop/cop/style/when_then_spec.rb