rubocop 0.76.0 → 0.77.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/config/default.yml +252 -239
  4. data/lib/rubocop.rb +27 -20
  5. data/lib/rubocop/ast/node.rb +1 -1
  6. data/lib/rubocop/ast/node/block_node.rb +2 -0
  7. data/lib/rubocop/cli.rb +11 -230
  8. data/lib/rubocop/cli/command.rb +21 -0
  9. data/lib/rubocop/cli/command/auto_genenerate_config.rb +105 -0
  10. data/lib/rubocop/cli/command/base.rb +33 -0
  11. data/lib/rubocop/cli/command/execute_runner.rb +76 -0
  12. data/lib/rubocop/cli/command/init_dotfile.rb +45 -0
  13. data/lib/rubocop/cli/command/show_cops.rb +73 -0
  14. data/lib/rubocop/cli/command/version.rb +17 -0
  15. data/lib/rubocop/cli/environment.rb +21 -0
  16. data/lib/rubocop/config_obsoletion.rb +62 -9
  17. data/lib/rubocop/config_validator.rb +1 -3
  18. data/lib/rubocop/cop/bundler/gem_comment.rb +4 -4
  19. data/lib/rubocop/cop/cop.rb +19 -0
  20. data/lib/rubocop/cop/correctors/space_corrector.rb +1 -2
  21. data/lib/rubocop/cop/internal_affairs.rb +1 -0
  22. data/lib/rubocop/cop/internal_affairs/method_name_equal.rb +59 -0
  23. data/lib/rubocop/cop/layout/{align_arguments.rb → argument_alignment.rb} +1 -1
  24. data/lib/rubocop/cop/layout/{align_array.rb → array_alignment.rb} +1 -1
  25. data/lib/rubocop/cop/layout/{indent_assignment.rb → assignment_indentation.rb} +1 -1
  26. data/lib/rubocop/cop/layout/extra_spacing.rb +1 -1
  27. data/lib/rubocop/cop/layout/{indent_first_argument.rb → first_argument_indentation.rb} +3 -3
  28. data/lib/rubocop/cop/layout/{indent_first_array_element.rb → first_array_element_indentation.rb} +4 -4
  29. data/lib/rubocop/cop/layout/{indent_first_hash_element.rb → first_hash_element_indentation.rb} +3 -3
  30. data/lib/rubocop/cop/layout/{indent_first_parameter.rb → first_parameter_indentation.rb} +3 -3
  31. data/lib/rubocop/cop/layout/{align_hash.rb → hash_alignment.rb} +2 -2
  32. data/lib/rubocop/cop/layout/{indent_heredoc.rb → heredoc_indentation.rb} +1 -1
  33. data/lib/rubocop/cop/layout/{leading_blank_lines.rb → leading_empty_lines.rb} +1 -1
  34. data/lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb +1 -1
  35. data/lib/rubocop/cop/layout/{align_parameters.rb → parameter_alignment.rb} +1 -1
  36. data/lib/rubocop/cop/layout/space_around_keyword.rb +12 -0
  37. data/lib/rubocop/cop/layout/space_around_operators.rb +1 -1
  38. data/lib/rubocop/cop/layout/{trailing_blank_lines.rb → trailing_empty_lines.rb} +1 -1
  39. data/lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb +1 -1
  40. data/lib/rubocop/cop/lint/{duplicated_key.rb → duplicate_hash_key.rb} +1 -1
  41. data/lib/rubocop/cop/lint/ineffective_access_modifier.rb +1 -1
  42. data/lib/rubocop/cop/lint/{multiple_compare.rb → multiple_comparison.rb} +1 -1
  43. data/lib/rubocop/cop/lint/redundant_splat_expansion.rb +1 -1
  44. data/lib/rubocop/cop/lint/{string_conversion_in_interpolation.rb → redundant_string_coercion.rb} +1 -1
  45. data/lib/rubocop/cop/lint/redundant_with_index.rb +2 -2
  46. data/lib/rubocop/cop/lint/redundant_with_object.rb +2 -2
  47. data/lib/rubocop/cop/lint/{handle_exceptions.rb → suppressed_exception.rb} +1 -1
  48. data/lib/rubocop/cop/lint/useless_access_modifier.rb +57 -23
  49. data/lib/rubocop/cop/lint/useless_setter_call.rb +1 -1
  50. data/lib/rubocop/cop/metrics/line_length.rb +41 -38
  51. data/lib/rubocop/cop/metrics/method_length.rb +1 -1
  52. data/lib/rubocop/cop/mixin/{hash_alignment.rb → hash_alignment_styles.rb} +1 -1
  53. data/lib/rubocop/cop/mixin/nil_methods.rb +4 -4
  54. data/lib/rubocop/cop/naming/{uncommunicative_block_param_name.rb → block_parameter_name.rb} +3 -3
  55. data/lib/rubocop/cop/naming/heredoc_delimiter_naming.rb +5 -5
  56. data/lib/rubocop/cop/naming/{uncommunicative_method_param_name.rb → method_parameter_name.rb} +3 -3
  57. data/lib/rubocop/cop/naming/predicate_name.rb +6 -6
  58. data/lib/rubocop/cop/style/alias.rb +1 -1
  59. data/lib/rubocop/cop/style/array_join.rb +1 -1
  60. data/lib/rubocop/cop/style/eval_with_location.rb +1 -1
  61. data/lib/rubocop/cop/style/even_odd.rb +1 -1
  62. data/lib/rubocop/cop/style/ip_addresses.rb +4 -4
  63. data/lib/rubocop/cop/style/mixin_grouping.rb +1 -1
  64. data/lib/rubocop/cop/style/nested_parenthesized_calls.rb +5 -5
  65. data/lib/rubocop/cop/style/next.rb +5 -5
  66. data/lib/rubocop/cop/style/numeric_literals.rb +7 -3
  67. data/lib/rubocop/cop/style/option_hash.rb +3 -3
  68. data/lib/rubocop/cop/style/redundant_parentheses.rb +3 -3
  69. data/lib/rubocop/cop/style/redundant_return.rb +2 -8
  70. data/lib/rubocop/cop/style/redundant_sort.rb +1 -1
  71. data/lib/rubocop/cop/style/trivial_accessors.rb +5 -5
  72. data/lib/rubocop/cop/team.rb +5 -0
  73. data/lib/rubocop/formatter/clang_style_formatter.rb +1 -3
  74. data/lib/rubocop/formatter/tap_formatter.rb +1 -3
  75. data/lib/rubocop/processed_source.rb +1 -1
  76. data/lib/rubocop/rake_task.rb +1 -0
  77. data/lib/rubocop/result_cache.rb +21 -7
  78. data/lib/rubocop/runner.rb +13 -1
  79. data/lib/rubocop/version.rb +1 -1
  80. metadata +30 -22
  81. data/lib/rubocop/cop/mixin/safe_mode.rb +0 -24
@@ -91,7 +91,7 @@ module RuboCop
91
91
  when :def, :defs
92
92
  return :dynamic
93
93
  when :block
94
- return :instance_eval if parent.method_name == :instance_eval
94
+ return :instance_eval if parent.method?(:instance_eval)
95
95
 
96
96
  return :dynamic
97
97
  end
@@ -3,7 +3,7 @@
3
3
  module RuboCop
4
4
  module Cop
5
5
  module Style
6
- # This cop checks for uses of "*" as a substitute for *join*.
6
+ # This cop checks for uses of "\*" as a substitute for *join*.
7
7
  #
8
8
  # Not all cases can reliably checked, due to Ruby's dynamic
9
9
  # types, so we consider only cases when the first argument is an
@@ -85,7 +85,7 @@ module RuboCop
85
85
  # FIXME: It's a Style/ConditionalAssignment's false positive.
86
86
  # rubocop:disable Style/ConditionalAssignment
87
87
  def with_lineno?(node)
88
- if node.method_name == :eval
88
+ if node.method?(:eval)
89
89
  node.arguments.size == 4
90
90
  else
91
91
  node.arguments.size == 3
@@ -23,7 +23,7 @@ module RuboCop
23
23
  {(send $_ :% (int 2))
24
24
  (begin (send $_ :% (int 2)))}
25
25
  ${:== :!=}
26
- (int ${0 1 2}))
26
+ (int ${0 1}))
27
27
  PATTERN
28
28
 
29
29
  def on_send(node)
@@ -28,7 +28,7 @@ module RuboCop
28
28
  contents = node.source[1...-1]
29
29
  return false if contents.empty?
30
30
 
31
- return false if whitelist.include?(contents.downcase)
31
+ return false if allowed_addresses.include?(contents.downcase)
32
32
 
33
33
  # To try to avoid doing two regex checks on every string,
34
34
  # shortcut out if the string does not look like an IP address
@@ -47,9 +47,9 @@ module RuboCop
47
47
 
48
48
  private
49
49
 
50
- def whitelist
51
- whitelist = cop_config['Whitelist']
52
- Array(whitelist).map(&:downcase)
50
+ def allowed_addresses
51
+ allowed_addresses = cop_config['AllowedAddresses']
52
+ Array(allowed_addresses).map(&:downcase)
53
53
  end
54
54
 
55
55
  def could_be_ip?(str)
@@ -103,7 +103,7 @@ module RuboCop
103
103
  .select(&:macro?)
104
104
 
105
105
  siblings.select do |sibling_node|
106
- sibling_node.method_name == send_node.method_name
106
+ sibling_node.method?(send_node.method_name)
107
107
  end
108
108
  end
109
109
 
@@ -49,17 +49,17 @@ module RuboCop
49
49
  def allowed_omission?(send_node)
50
50
  !send_node.arguments? || send_node.parenthesized? ||
51
51
  send_node.setter_method? || send_node.operator_method? ||
52
- whitelisted?(send_node)
52
+ allowed?(send_node)
53
53
  end
54
54
 
55
- def whitelisted?(send_node)
55
+ def allowed?(send_node)
56
56
  send_node.parent.arguments.one? &&
57
- whitelisted_methods.include?(send_node.method_name.to_s) &&
57
+ allowed_methods.include?(send_node.method_name.to_s) &&
58
58
  send_node.arguments.one?
59
59
  end
60
60
 
61
- def whitelisted_methods
62
- cop_config['Whitelist'] || []
61
+ def allowed_methods
62
+ cop_config['AllowedMethods'] || []
63
63
  end
64
64
  end
65
65
  end
@@ -20,18 +20,18 @@ module RuboCop
20
20
  # end
21
21
  #
22
22
  # # good
23
- # [1, 2].each do |o|
24
- # puts o unless o == 1
23
+ # [1, 2].each do |a|
24
+ # puts a if a == 1
25
25
  # end
26
26
  #
27
27
  # @example EnforcedStyle: always
28
28
  # # With `always` all conditions at the end of an iteration needs to be
29
29
  # # replaced by next - with `skip_modifier_ifs` the modifier if like
30
- # # this one are ignored: `[1, 2].each { |a| return 'yes' if a == 1 }`
30
+ # # this one are ignored: `[1, 2].each { |a| puts a if a == 1 }`
31
31
  #
32
32
  # # bad
33
- # [1, 2].each do |o|
34
- # puts o unless o == 1
33
+ # [1, 2].each do |a|
34
+ # puts a if a == 1
35
35
  # end
36
36
  #
37
37
  # # bad
@@ -9,18 +9,22 @@ module RuboCop
9
9
  # @example
10
10
  #
11
11
  # # bad
12
- #
13
12
  # 1000000
14
13
  # 1_00_000
15
14
  # 1_0000
16
15
  #
17
16
  # # good
18
- #
19
17
  # 1_000_000
20
18
  # 1000
21
19
  #
22
- # # good unless Strict is set
20
+ # @example Strict: false (default)
23
21
  #
22
+ # # good
23
+ # 10_000_00 # typical representation of $10,000 in cents
24
+ #
25
+ # @example Strict: true
26
+ #
27
+ # # bad
24
28
  # 10_000_00 # typical representation of $10,000 in cents
25
29
  #
26
30
  class NumericLiterals < Cop
@@ -28,7 +28,7 @@ module RuboCop
28
28
 
29
29
  def on_args(node)
30
30
  return if super_used?(node)
31
- return if whitelist.include?(node.parent.method_name.to_s)
31
+ return if allowlist.include?(node.parent.method_name.to_s)
32
32
 
33
33
  option_hash(node) do |options|
34
34
  add_offense(options)
@@ -37,8 +37,8 @@ module RuboCop
37
37
 
38
38
  private
39
39
 
40
- def whitelist
41
- cop_config['Whitelist'] || []
40
+ def allowlist
41
+ cop_config['Allowlist'] || []
42
42
  end
43
43
 
44
44
  def suspicious_name?(arg_name)
@@ -19,7 +19,7 @@ module RuboCop
19
19
  def_node_matcher :square_brackets?,
20
20
  '(send {(send _recv _msg) str array hash} :[] ...)'
21
21
  def_node_matcher :range_end?, '^^{irange erange}'
22
- def_node_matcher :method_node_and_args, '$(send _recv _msg $...)'
22
+ def_node_matcher :method_node_and_args, '$(call _recv _msg $...)'
23
23
  def_node_matcher :rescue?, '{^resbody ^^resbody}'
24
24
  def_node_matcher :arg_in_call_with_block?,
25
25
  '^^(block (send _ _ equal?(%0) ...) ...)'
@@ -102,7 +102,7 @@ module RuboCop
102
102
  return offense(begin_node, 'a variable') if node.variable?
103
103
  return offense(begin_node, 'a constant') if node.const_type?
104
104
 
105
- check_send(begin_node, node) if node.send_type?
105
+ check_send(begin_node, node) if node.call_type?
106
106
  end
107
107
 
108
108
  def check_send(begin_node, node)
@@ -195,7 +195,7 @@ module RuboCop
195
195
  end
196
196
 
197
197
  def method_call_with_redundant_parentheses?(node)
198
- return false unless node.send_type?
198
+ return false unless node.call_type?
199
199
  return false if node.prefix_not?
200
200
  return false if range_end?(node)
201
201
 
@@ -54,8 +54,6 @@ module RuboCop
54
54
  MULTI_RETURN_MSG = 'To return multiple values, use an array.'
55
55
 
56
56
  def on_def(node)
57
- return unless node.body
58
-
59
57
  check_branch(node.body)
60
58
  end
61
59
  alias on_defs on_def
@@ -152,12 +150,8 @@ module RuboCop
152
150
  end
153
151
 
154
152
  def check_begin_node(node)
155
- expressions = *node
156
- last_expr = expressions.last
157
-
158
- return unless last_expr&.return_type?
159
-
160
- check_return_node(last_expr)
153
+ last_expr = node.children.last
154
+ check_branch(last_expr)
161
155
  end
162
156
 
163
157
  def allow_multiple_return_values?
@@ -127,7 +127,7 @@ module RuboCop
127
127
  end
128
128
 
129
129
  def base(accessor, arg)
130
- if accessor == :first || (arg&.zero?)
130
+ if accessor == :first || arg&.zero?
131
131
  'min'
132
132
  elsif accessor == :last || arg == -1
133
133
  'max'
@@ -60,7 +60,7 @@ module RuboCop
60
60
  when :module
61
61
  return true
62
62
  else
63
- return true if pnode.method_name == :instance_eval
63
+ return true if pnode.method?(:instance_eval)
64
64
  end
65
65
  end
66
66
  false
@@ -95,9 +95,9 @@ module RuboCop
95
95
  cop_config['IgnoreClassMethods']
96
96
  end
97
97
 
98
- def whitelist
99
- whitelist = cop_config['Whitelist']
100
- Array(whitelist).map(&:to_sym) + [:initialize]
98
+ def allowed_methods
99
+ allowed_methods = cop_config['AllowedMethods']
100
+ Array(allowed_methods).map(&:to_sym) + [:initialize]
101
101
  end
102
102
 
103
103
  def dsl_writer?(method_name)
@@ -124,7 +124,7 @@ module RuboCop
124
124
  PATTERN
125
125
 
126
126
  def allowed_method?(node)
127
- whitelist.include?(node.method_name) ||
127
+ allowed_methods.include?(node.method_name) ||
128
128
  exact_name_match? && !names_match?(node)
129
129
  end
130
130
 
@@ -86,6 +86,11 @@ module RuboCop
86
86
  raise e.cause
87
87
  end
88
88
 
89
+ def external_dependency_checksum
90
+ keys = cops.map(&:external_dependency_checksum).compact
91
+ Digest::SHA1.hexdigest(keys.join)
92
+ end
93
+
89
94
  private
90
95
 
91
96
  def offenses(processed_source)
@@ -24,16 +24,14 @@ module RuboCop
24
24
  message: message(offense)
25
25
  )
26
26
 
27
- # rubocop:disable Lint/HandleExceptions
28
27
  begin
29
28
  return unless valid_line?(offense)
30
29
 
31
30
  report_line(offense.location)
32
31
  report_highlighted_area(offense.highlighted_area)
33
- rescue IndexError
32
+ rescue IndexError # rubocop:disable Lint/SuppressedException
34
33
  # range is not on a valid line; perhaps the source file is empty
35
34
  end
36
- # rubocop:enable Lint/HandleExceptions
37
35
  end
38
36
 
39
37
  def valid_line?(offense)
@@ -51,16 +51,14 @@ module RuboCop
51
51
  message: message(offense)
52
52
  )
53
53
 
54
- # rubocop:disable Lint/HandleExceptions
55
54
  begin
56
55
  return unless valid_line?(offense)
57
56
 
58
57
  report_line(offense.location)
59
58
  report_highlighted_area(offense.highlighted_area)
60
- rescue IndexError
59
+ rescue IndexError # rubocop:disable Lint/SuppressedException
61
60
  # range is not on a valid line; perhaps the source file is empty
62
61
  end
63
- # rubocop:enable Lint/HandleExceptions
64
62
  end
65
63
 
66
64
  def annotate_message(msg)
@@ -163,7 +163,7 @@ module RuboCop
163
163
  ast, comments, tokens = parser.tokenize(@buffer)
164
164
 
165
165
  ast.respond_to?(:complete!) && ast.complete!
166
- rescue Parser::SyntaxError # rubocop:disable Lint/HandleExceptions
166
+ rescue Parser::SyntaxError # rubocop:disable Lint/SuppressedException
167
167
  # All errors are in diagnostics. No need to handle exception.
168
168
  end
169
169
 
@@ -70,6 +70,7 @@ module RuboCop
70
70
  RakeFileUtils.verbose(verbose) do
71
71
  yield(*[self, task_args].slice(0, task_block.arity)) if block_given?
72
72
  options = full_options.unshift('--auto-correct')
73
+ options.delete('--parallel')
73
74
  run_cli(verbose, options)
74
75
  end
75
76
  end
@@ -77,12 +77,13 @@ module RuboCop
77
77
  config_store.for('.').for_all_cops['AllowSymlinksInCacheRootDirectory']
78
78
  end
79
79
 
80
- def initialize(file, options, config_store, cache_root = nil)
80
+ def initialize(file, team, options, config_store, cache_root = nil)
81
81
  cache_root ||= ResultCache.cache_root(config_store)
82
82
  @allow_symlinks_in_cache_location =
83
83
  ResultCache.allow_symlinks_in_cache_location?(config_store)
84
- @path = File.join(cache_root, rubocop_checksum,
85
- relevant_options_digest(options),
84
+ @path = File.join(cache_root,
85
+ rubocop_checksum,
86
+ context_checksum(team, options),
86
87
  file_checksum(file, config_store))
87
88
  @cached_data = CachedData.new(file)
88
89
  end
@@ -182,10 +183,23 @@ module RuboCop
182
183
  # don't affect caching.
183
184
  def relevant_options_digest(options)
184
185
  options = options.reject { |key, _| NON_CHANGING.include?(key) }
185
- options = options.to_s.gsub(/[^a-z]+/i, '_')
186
- # We must avoid making file names too long for some filesystems to handle
187
- # If they are short, we can leave them human-readable
188
- options.length <= 32 ? options : Digest::SHA1.hexdigest(options)
186
+ options.to_s.gsub(/[^a-z]+/i, '_')
187
+ end
188
+
189
+ def team_checksum(team)
190
+ @checksum_by_team ||= {}
191
+ @checksum_by_team[team.object_id] ||= team.external_dependency_checksum
192
+ end
193
+
194
+ # We combine team and options into a single "context" checksum to avoid
195
+ # making file names that are too long for some filesystems to handle.
196
+ # This context is for anything that's not (1) the RuboCop executable
197
+ # checksum or (2) the inspected file checksum.
198
+ def context_checksum(team, options)
199
+ Digest::SHA1.hexdigest([
200
+ team_checksum(team),
201
+ relevant_options_digest(options)
202
+ ].join)
189
203
  end
190
204
  end
191
205
  end
@@ -121,8 +121,14 @@ module RuboCop
121
121
  end
122
122
  end
123
123
 
124
+ def cached_result(file, team)
125
+ ResultCache.new(file, team, @options, @config_store)
126
+ end
127
+
124
128
  def file_offense_cache(file)
125
- cache = ResultCache.new(file, @options, @config_store) if cached_run?
129
+ config = @config_store.for(file)
130
+ cache = cached_result(file, standby_team(config)) if cached_run?
131
+
126
132
  if cache&.valid?
127
133
  offenses = cache.load
128
134
  # If we're running --auto-correct and the cache says there are
@@ -359,5 +365,11 @@ module RuboCop
359
365
  ProcessedSource.from_file(file, ruby_version)
360
366
  end
361
367
  end
368
+
369
+ def standby_team(config)
370
+ @team_by_config ||= {}
371
+ @team_by_config[config.object_id] ||=
372
+ Cop::Team.new(mobilized_cop_classes(config), config, @options)
373
+ end
362
374
  end
363
375
  end
@@ -3,7 +3,7 @@
3
3
  module RuboCop
4
4
  # This module holds the RuboCop version information.
5
5
  module Version
6
- STRING = '0.76.0'
6
+ STRING = '0.77.0'
7
7
 
8
8
  MSG = '%<version>s (using Parser %<parser_version>s, running on ' \
9
9
  '%<ruby_engine>s %<ruby_version>s %<ruby_platform>s)'
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.76.0
4
+ version: 0.77.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bozhidar Batsov
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2019-10-28 00:00:00.000000000 Z
13
+ date: 2019-11-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: jaro_winkler
@@ -199,6 +199,14 @@ files:
199
199
  - lib/rubocop/ast/traversal.rb
200
200
  - lib/rubocop/cached_data.rb
201
201
  - lib/rubocop/cli.rb
202
+ - lib/rubocop/cli/command.rb
203
+ - lib/rubocop/cli/command/auto_genenerate_config.rb
204
+ - lib/rubocop/cli/command/base.rb
205
+ - lib/rubocop/cli/command/execute_runner.rb
206
+ - lib/rubocop/cli/command/init_dotfile.rb
207
+ - lib/rubocop/cli/command/show_cops.rb
208
+ - lib/rubocop/cli/command/version.rb
209
+ - lib/rubocop/cli/environment.rb
202
210
  - lib/rubocop/comment_config.rb
203
211
  - lib/rubocop/config.rb
204
212
  - lib/rubocop/config_loader.rb
@@ -240,6 +248,7 @@ files:
240
248
  - lib/rubocop/cop/generator/require_file_injector.rb
241
249
  - lib/rubocop/cop/ignored_node.rb
242
250
  - lib/rubocop/cop/internal_affairs.rb
251
+ - lib/rubocop/cop/internal_affairs/method_name_equal.rb
243
252
  - lib/rubocop/cop/internal_affairs/node_destructuring.rb
244
253
  - lib/rubocop/cop/internal_affairs/node_type_predicate.rb
245
254
  - lib/rubocop/cop/internal_affairs/offense_location_keyword.rb
@@ -247,10 +256,9 @@ files:
247
256
  - lib/rubocop/cop/internal_affairs/redundant_message_argument.rb
248
257
  - lib/rubocop/cop/internal_affairs/useless_message_assertion.rb
249
258
  - lib/rubocop/cop/layout/access_modifier_indentation.rb
250
- - lib/rubocop/cop/layout/align_arguments.rb
251
- - lib/rubocop/cop/layout/align_array.rb
252
- - lib/rubocop/cop/layout/align_hash.rb
253
- - lib/rubocop/cop/layout/align_parameters.rb
259
+ - lib/rubocop/cop/layout/argument_alignment.rb
260
+ - lib/rubocop/cop/layout/array_alignment.rb
261
+ - lib/rubocop/cop/layout/assignment_indentation.rb
254
262
  - lib/rubocop/cop/layout/block_alignment.rb
255
263
  - lib/rubocop/cop/layout/block_end_newline.rb
256
264
  - lib/rubocop/cop/layout/case_indentation.rb
@@ -278,22 +286,22 @@ files:
278
286
  - lib/rubocop/cop/layout/end_alignment.rb
279
287
  - lib/rubocop/cop/layout/end_of_line.rb
280
288
  - lib/rubocop/cop/layout/extra_spacing.rb
289
+ - lib/rubocop/cop/layout/first_argument_indentation.rb
290
+ - lib/rubocop/cop/layout/first_array_element_indentation.rb
281
291
  - lib/rubocop/cop/layout/first_array_element_line_break.rb
292
+ - lib/rubocop/cop/layout/first_hash_element_indentation.rb
282
293
  - lib/rubocop/cop/layout/first_hash_element_line_break.rb
283
294
  - lib/rubocop/cop/layout/first_method_argument_line_break.rb
284
295
  - lib/rubocop/cop/layout/first_method_parameter_line_break.rb
296
+ - lib/rubocop/cop/layout/first_parameter_indentation.rb
297
+ - lib/rubocop/cop/layout/hash_alignment.rb
285
298
  - lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb
286
- - lib/rubocop/cop/layout/indent_assignment.rb
287
- - lib/rubocop/cop/layout/indent_first_argument.rb
288
- - lib/rubocop/cop/layout/indent_first_array_element.rb
289
- - lib/rubocop/cop/layout/indent_first_hash_element.rb
290
- - lib/rubocop/cop/layout/indent_first_parameter.rb
291
- - lib/rubocop/cop/layout/indent_heredoc.rb
299
+ - lib/rubocop/cop/layout/heredoc_indentation.rb
292
300
  - lib/rubocop/cop/layout/indentation_consistency.rb
293
301
  - lib/rubocop/cop/layout/indentation_width.rb
294
302
  - lib/rubocop/cop/layout/initial_indentation.rb
295
- - lib/rubocop/cop/layout/leading_blank_lines.rb
296
303
  - lib/rubocop/cop/layout/leading_comment_space.rb
304
+ - lib/rubocop/cop/layout/leading_empty_lines.rb
297
305
  - lib/rubocop/cop/layout/multiline_array_brace_layout.rb
298
306
  - lib/rubocop/cop/layout/multiline_array_line_breaks.rb
299
307
  - lib/rubocop/cop/layout/multiline_assignment_layout.rb
@@ -305,6 +313,7 @@ files:
305
313
  - lib/rubocop/cop/layout/multiline_method_call_indentation.rb
306
314
  - lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb
307
315
  - lib/rubocop/cop/layout/multiline_operation_indentation.rb
316
+ - lib/rubocop/cop/layout/parameter_alignment.rb
308
317
  - lib/rubocop/cop/layout/rescue_ensure_alignment.rb
309
318
  - lib/rubocop/cop/layout/space_after_colon.rb
310
319
  - lib/rubocop/cop/layout/space_after_comma.rb
@@ -331,7 +340,7 @@ files:
331
340
  - lib/rubocop/cop/layout/space_inside_reference_brackets.rb
332
341
  - lib/rubocop/cop/layout/space_inside_string_interpolation.rb
333
342
  - lib/rubocop/cop/layout/tab.rb
334
- - lib/rubocop/cop/layout/trailing_blank_lines.rb
343
+ - lib/rubocop/cop/layout/trailing_empty_lines.rb
335
344
  - lib/rubocop/cop/layout/trailing_whitespace.rb
336
345
  - lib/rubocop/cop/lint/ambiguous_block_association.rb
337
346
  - lib/rubocop/cop/lint/ambiguous_operator.rb
@@ -344,8 +353,8 @@ files:
344
353
  - lib/rubocop/cop/lint/deprecated_class_methods.rb
345
354
  - lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb
346
355
  - lib/rubocop/cop/lint/duplicate_case_condition.rb
356
+ - lib/rubocop/cop/lint/duplicate_hash_key.rb
347
357
  - lib/rubocop/cop/lint/duplicate_methods.rb
348
- - lib/rubocop/cop/lint/duplicated_key.rb
349
358
  - lib/rubocop/cop/lint/each_with_object_argument.rb
350
359
  - lib/rubocop/cop/lint/else_layout.rb
351
360
  - lib/rubocop/cop/lint/empty_ensure.rb
@@ -358,7 +367,6 @@ files:
358
367
  - lib/rubocop/cop/lint/flip_flop.rb
359
368
  - lib/rubocop/cop/lint/float_out_of_range.rb
360
369
  - lib/rubocop/cop/lint/format_parameter_mismatch.rb
361
- - lib/rubocop/cop/lint/handle_exceptions.rb
362
370
  - lib/rubocop/cop/lint/heredoc_method_call_position.rb
363
371
  - lib/rubocop/cop/lint/implicit_string_concatenation.rb
364
372
  - lib/rubocop/cop/lint/ineffective_access_modifier.rb
@@ -368,7 +376,7 @@ files:
368
376
  - lib/rubocop/cop/lint/literal_in_interpolation.rb
369
377
  - lib/rubocop/cop/lint/loop.rb
370
378
  - lib/rubocop/cop/lint/missing_cop_enable_directive.rb
371
- - lib/rubocop/cop/lint/multiple_compare.rb
379
+ - lib/rubocop/cop/lint/multiple_comparison.rb
372
380
  - lib/rubocop/cop/lint/nested_method_definition.rb
373
381
  - lib/rubocop/cop/lint/nested_percent_literal.rb
374
382
  - lib/rubocop/cop/lint/next_without_accumulator.rb
@@ -383,6 +391,7 @@ files:
383
391
  - lib/rubocop/cop/lint/redundant_cop_enable_directive.rb
384
392
  - lib/rubocop/cop/lint/redundant_require_statement.rb
385
393
  - lib/rubocop/cop/lint/redundant_splat_expansion.rb
394
+ - lib/rubocop/cop/lint/redundant_string_coercion.rb
386
395
  - lib/rubocop/cop/lint/redundant_with_index.rb
387
396
  - lib/rubocop/cop/lint/redundant_with_object.rb
388
397
  - lib/rubocop/cop/lint/regexp_as_condition.rb
@@ -398,7 +407,7 @@ files:
398
407
  - lib/rubocop/cop/lint/shadowed_argument.rb
399
408
  - lib/rubocop/cop/lint/shadowed_exception.rb
400
409
  - lib/rubocop/cop/lint/shadowing_outer_local_variable.rb
401
- - lib/rubocop/cop/lint/string_conversion_in_interpolation.rb
410
+ - lib/rubocop/cop/lint/suppressed_exception.rb
402
411
  - lib/rubocop/cop/lint/syntax.rb
403
412
  - lib/rubocop/cop/lint/to_json.rb
404
413
  - lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb
@@ -449,7 +458,7 @@ files:
449
458
  - lib/rubocop/cop/mixin/enforce_superclass.rb
450
459
  - lib/rubocop/cop/mixin/first_element_line_break.rb
451
460
  - lib/rubocop/cop/mixin/frozen_string_literal.rb
452
- - lib/rubocop/cop/mixin/hash_alignment.rb
461
+ - lib/rubocop/cop/mixin/hash_alignment_styles.rb
453
462
  - lib/rubocop/cop/mixin/heredoc.rb
454
463
  - lib/rubocop/cop/mixin/ignored_methods.rb
455
464
  - lib/rubocop/cop/mixin/ignored_pattern.rb
@@ -476,7 +485,6 @@ files:
476
485
  - lib/rubocop/cop/mixin/range_help.rb
477
486
  - lib/rubocop/cop/mixin/rescue_node.rb
478
487
  - lib/rubocop/cop/mixin/safe_assignment.rb
479
- - lib/rubocop/cop/mixin/safe_mode.rb
480
488
  - lib/rubocop/cop/mixin/space_after_punctuation.rb
481
489
  - lib/rubocop/cop/mixin/space_before_punctuation.rb
482
490
  - lib/rubocop/cop/mixin/statement_modifier.rb
@@ -492,6 +500,7 @@ files:
492
500
  - lib/rubocop/cop/naming/accessor_method_name.rb
493
501
  - lib/rubocop/cop/naming/ascii_identifiers.rb
494
502
  - lib/rubocop/cop/naming/binary_operator_parameter_name.rb
503
+ - lib/rubocop/cop/naming/block_parameter_name.rb
495
504
  - lib/rubocop/cop/naming/class_and_module_camel_case.rb
496
505
  - lib/rubocop/cop/naming/constant_name.rb
497
506
  - lib/rubocop/cop/naming/file_name.rb
@@ -499,10 +508,9 @@ files:
499
508
  - lib/rubocop/cop/naming/heredoc_delimiter_naming.rb
500
509
  - lib/rubocop/cop/naming/memoized_instance_variable_name.rb
501
510
  - lib/rubocop/cop/naming/method_name.rb
511
+ - lib/rubocop/cop/naming/method_parameter_name.rb
502
512
  - lib/rubocop/cop/naming/predicate_name.rb
503
513
  - lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb
504
- - lib/rubocop/cop/naming/uncommunicative_block_param_name.rb
505
- - lib/rubocop/cop/naming/uncommunicative_method_param_name.rb
506
514
  - lib/rubocop/cop/naming/variable_name.rb
507
515
  - lib/rubocop/cop/naming/variable_number.rb
508
516
  - lib/rubocop/cop/offense.rb