rubocop 0.58.2 → 0.59.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (211) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/config/default.yml +22 -7
  4. data/config/disabled.yml +33 -4
  5. data/config/enabled.yml +4 -11
  6. data/lib/rubocop.rb +5 -0
  7. data/lib/rubocop/ast/builder.rb +1 -0
  8. data/lib/rubocop/ast/node.rb +11 -33
  9. data/lib/rubocop/ast/node/block_node.rb +8 -1
  10. data/lib/rubocop/ast/node/defined_node.rb +13 -0
  11. data/lib/rubocop/ast/node/mixin/method_dispatch_node.rb +16 -5
  12. data/lib/rubocop/ast/node/mixin/method_identifier_predicates.rb +21 -0
  13. data/lib/rubocop/ast/node/send_node.rb +3 -12
  14. data/lib/rubocop/ast/traversal.rb +10 -0
  15. data/lib/rubocop/cli.rb +4 -1
  16. data/lib/rubocop/config.rb +21 -5
  17. data/lib/rubocop/config_loader.rb +2 -0
  18. data/lib/rubocop/config_loader_resolver.rb +3 -1
  19. data/lib/rubocop/cop/autocorrect_logic.rb +1 -0
  20. data/lib/rubocop/cop/bundler/gem_comment.rb +64 -0
  21. data/lib/rubocop/cop/bundler/ordered_gems.rb +2 -0
  22. data/lib/rubocop/cop/commissioner.rb +2 -0
  23. data/lib/rubocop/cop/cop.rb +3 -0
  24. data/lib/rubocop/cop/corrector.rb +2 -0
  25. data/lib/rubocop/cop/correctors/alignment_corrector.rb +1 -0
  26. data/lib/rubocop/cop/correctors/line_break_corrector.rb +2 -0
  27. data/lib/rubocop/cop/correctors/space_corrector.rb +2 -0
  28. data/lib/rubocop/cop/force.rb +1 -0
  29. data/lib/rubocop/cop/gemspec/ordered_dependencies.rb +1 -0
  30. data/lib/rubocop/cop/generator.rb +1 -0
  31. data/lib/rubocop/cop/layout/access_modifier_indentation.rb +1 -0
  32. data/lib/rubocop/cop/layout/class_structure.rb +4 -0
  33. data/lib/rubocop/cop/layout/closing_heredoc_indentation.rb +5 -4
  34. data/lib/rubocop/cop/layout/closing_parenthesis_indentation.rb +35 -0
  35. data/lib/rubocop/cop/layout/else_alignment.rb +1 -0
  36. data/lib/rubocop/cop/layout/empty_line_between_defs.rb +2 -0
  37. data/lib/rubocop/cop/layout/empty_lines_around_arguments.rb +1 -0
  38. data/lib/rubocop/cop/layout/empty_lines_around_class_body.rb +5 -2
  39. data/lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb +1 -0
  40. data/lib/rubocop/cop/layout/end_of_line.rb +1 -0
  41. data/lib/rubocop/cop/layout/extra_spacing.rb +1 -0
  42. data/lib/rubocop/cop/layout/indent_array.rb +1 -0
  43. data/lib/rubocop/cop/layout/indent_heredoc.rb +3 -0
  44. data/lib/rubocop/cop/layout/indentation_width.rb +2 -0
  45. data/lib/rubocop/cop/layout/multiline_method_call_indentation.rb +1 -0
  46. data/lib/rubocop/cop/layout/multiline_operation_indentation.rb +2 -1
  47. data/lib/rubocop/cop/layout/rescue_ensure_alignment.rb +34 -11
  48. data/lib/rubocop/cop/layout/space_after_method_name.rb +1 -0
  49. data/lib/rubocop/cop/layout/space_after_not.rb +1 -1
  50. data/lib/rubocop/cop/layout/space_around_keyword.rb +3 -1
  51. data/lib/rubocop/cop/layout/space_around_operators.rb +1 -0
  52. data/lib/rubocop/cop/layout/space_before_comment.rb +1 -0
  53. data/lib/rubocop/cop/layout/space_in_lambda_literal.rb +16 -8
  54. data/lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb +2 -0
  55. data/lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb +1 -1
  56. data/lib/rubocop/cop/layout/space_inside_reference_brackets.rb +2 -0
  57. data/lib/rubocop/cop/layout/tab.rb +1 -0
  58. data/lib/rubocop/cop/layout/trailing_whitespace.rb +1 -0
  59. data/lib/rubocop/cop/lint/deprecated_class_methods.rb +1 -0
  60. data/lib/rubocop/cop/lint/duplicate_methods.rb +9 -1
  61. data/lib/rubocop/cop/lint/format_parameter_mismatch.rb +1 -0
  62. data/lib/rubocop/cop/lint/ineffective_access_modifier.rb +1 -0
  63. data/lib/rubocop/cop/lint/interpolation_check.rb +2 -0
  64. data/lib/rubocop/cop/lint/literal_as_condition.rb +3 -6
  65. data/lib/rubocop/cop/lint/missing_cop_enable_directive.rb +1 -0
  66. data/lib/rubocop/cop/lint/nested_method_definition.rb +1 -0
  67. data/lib/rubocop/cop/lint/rescue_exception.rb +1 -0
  68. data/lib/rubocop/cop/lint/rescue_type.rb +1 -0
  69. data/lib/rubocop/cop/lint/safe_navigation_chain.rb +2 -2
  70. data/lib/rubocop/cop/lint/safe_navigation_consistency.rb +2 -0
  71. data/lib/rubocop/cop/lint/script_permission.rb +1 -0
  72. data/lib/rubocop/cop/lint/shadowed_argument.rb +3 -0
  73. data/lib/rubocop/cop/lint/shadowed_exception.rb +2 -0
  74. data/lib/rubocop/cop/lint/unneeded_cop_disable_directive.rb +1 -0
  75. data/lib/rubocop/cop/lint/unneeded_cop_enable_directive.rb +1 -0
  76. data/lib/rubocop/cop/lint/unneeded_require_statement.rb +1 -0
  77. data/lib/rubocop/cop/lint/unneeded_splat_expansion.rb +1 -1
  78. data/lib/rubocop/cop/lint/unreachable_code.rb +2 -0
  79. data/lib/rubocop/cop/lint/useless_assignment.rb +1 -0
  80. data/lib/rubocop/cop/lint/useless_setter_call.rb +3 -0
  81. data/lib/rubocop/cop/lint/void.rb +1 -0
  82. data/lib/rubocop/cop/message_annotator.rb +1 -0
  83. data/lib/rubocop/cop/metrics/block_length.rb +1 -0
  84. data/lib/rubocop/cop/metrics/block_nesting.rb +1 -0
  85. data/lib/rubocop/cop/metrics/line_length.rb +6 -1
  86. data/lib/rubocop/cop/metrics/method_length.rb +1 -0
  87. data/lib/rubocop/cop/mixin/annotation_comment.rb +1 -0
  88. data/lib/rubocop/cop/mixin/classish_length.rb +1 -0
  89. data/lib/rubocop/cop/mixin/configurable_enforced_style.rb +1 -0
  90. data/lib/rubocop/cop/mixin/configurable_formatting.rb +1 -0
  91. data/lib/rubocop/cop/mixin/empty_lines_around_body.rb +12 -6
  92. data/lib/rubocop/cop/mixin/empty_parameter.rb +1 -0
  93. data/lib/rubocop/cop/mixin/ignored_methods.rb +19 -0
  94. data/lib/rubocop/cop/mixin/multiline_expression_indentation.rb +25 -1
  95. data/lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb +5 -3
  96. data/lib/rubocop/cop/mixin/percent_literal.rb +2 -0
  97. data/lib/rubocop/cop/mixin/preceding_following_alignment.rb +2 -0
  98. data/lib/rubocop/cop/mixin/safe_assignment.rb +2 -1
  99. data/lib/rubocop/cop/mixin/statement_modifier.rb +6 -1
  100. data/lib/rubocop/cop/mixin/string_literals_help.rb +1 -0
  101. data/lib/rubocop/cop/mixin/surrounding_space.rb +4 -0
  102. data/lib/rubocop/cop/mixin/trailing_comma.rb +1 -0
  103. data/lib/rubocop/cop/mixin/uncommunicative_name.rb +2 -0
  104. data/lib/rubocop/cop/naming/ascii_identifiers.rb +1 -0
  105. data/lib/rubocop/cop/naming/binary_operator_parameter_name.rb +1 -0
  106. data/lib/rubocop/cop/naming/file_name.rb +4 -1
  107. data/lib/rubocop/cop/naming/memoized_instance_variable_name.rb +1 -0
  108. data/lib/rubocop/cop/naming/predicate_name.rb +1 -0
  109. data/lib/rubocop/cop/naming/uncommunicative_block_param_name.rb +1 -0
  110. data/lib/rubocop/cop/naming/uncommunicative_method_param_name.rb +1 -0
  111. data/lib/rubocop/cop/naming/variable_name.rb +1 -0
  112. data/lib/rubocop/cop/performance/case_when_splat.rb +11 -7
  113. data/lib/rubocop/cop/performance/casecmp.rb +33 -42
  114. data/lib/rubocop/cop/performance/chain_array_allocation.rb +77 -0
  115. data/lib/rubocop/cop/performance/compare_with_block.rb +3 -0
  116. data/lib/rubocop/cop/performance/regexp_match.rb +1 -0
  117. data/lib/rubocop/cop/performance/sample.rb +2 -0
  118. data/lib/rubocop/cop/performance/size.rb +8 -2
  119. data/lib/rubocop/cop/performance/string_replacement.rb +1 -0
  120. data/lib/rubocop/cop/rails/active_support_aliases.rb +1 -0
  121. data/lib/rubocop/cop/rails/bulk_change_table.rb +9 -2
  122. data/lib/rubocop/cop/rails/create_table_with_timestamps.rb +1 -0
  123. data/lib/rubocop/cop/rails/delegate.rb +7 -2
  124. data/lib/rubocop/cop/rails/dynamic_find_by.rb +1 -0
  125. data/lib/rubocop/cop/rails/find_each.rb +7 -2
  126. data/lib/rubocop/cop/rails/http_positional_arguments.rb +1 -1
  127. data/lib/rubocop/cop/rails/http_status.rb +2 -0
  128. data/lib/rubocop/cop/rails/inverse_of.rb +4 -0
  129. data/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb +1 -0
  130. data/lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb +1 -0
  131. data/lib/rubocop/cop/rails/reversible_migration.rb +1 -0
  132. data/lib/rubocop/cop/rails/save_bang.rb +189 -38
  133. data/lib/rubocop/cop/rails/time_zone.rb +1 -0
  134. data/lib/rubocop/cop/security/eval.rb +1 -0
  135. data/lib/rubocop/cop/security/json_load.rb +2 -2
  136. data/lib/rubocop/cop/security/open.rb +6 -3
  137. data/lib/rubocop/cop/severity.rb +1 -0
  138. data/lib/rubocop/cop/style/and_or.rb +3 -3
  139. data/lib/rubocop/cop/style/ascii_comments.rb +1 -0
  140. data/lib/rubocop/cop/style/block_delimiters.rb +2 -4
  141. data/lib/rubocop/cop/style/braces_around_hash_parameters.rb +2 -3
  142. data/lib/rubocop/cop/style/class_and_module_children.rb +3 -0
  143. data/lib/rubocop/cop/style/class_vars.rb +1 -1
  144. data/lib/rubocop/cop/style/colon_method_definition.rb +1 -0
  145. data/lib/rubocop/cop/style/commented_keyword.rb +2 -0
  146. data/lib/rubocop/cop/style/conditional_assignment.rb +2 -0
  147. data/lib/rubocop/cop/style/copyright.rb +7 -2
  148. data/lib/rubocop/cop/style/date_time.rb +40 -7
  149. data/lib/rubocop/cop/style/double_negation.rb +1 -1
  150. data/lib/rubocop/cop/style/empty_case_condition.rb +8 -0
  151. data/lib/rubocop/cop/style/empty_else.rb +2 -0
  152. data/lib/rubocop/cop/style/empty_lambda_parameter.rb +1 -0
  153. data/lib/rubocop/cop/style/eval_with_location.rb +2 -0
  154. data/lib/rubocop/cop/style/for.rb +56 -10
  155. data/lib/rubocop/cop/style/format_string_token.rb +1 -1
  156. data/lib/rubocop/cop/style/if_with_semicolon.rb +1 -0
  157. data/lib/rubocop/cop/style/inverse_methods.rb +1 -0
  158. data/lib/rubocop/cop/style/lambda.rb +1 -0
  159. data/lib/rubocop/cop/style/method_call_with_args_parentheses.rb +3 -5
  160. data/lib/rubocop/cop/style/method_call_without_args_parentheses.rb +3 -5
  161. data/lib/rubocop/cop/style/method_def_parentheses.rb +2 -2
  162. data/lib/rubocop/cop/style/missing_else.rb +1 -0
  163. data/lib/rubocop/cop/style/multiline_memoization.rb +1 -0
  164. data/lib/rubocop/cop/style/multiline_method_signature.rb +65 -0
  165. data/lib/rubocop/cop/style/multiple_comparison.rb +1 -0
  166. data/lib/rubocop/cop/style/nil_comparison.rb +45 -5
  167. data/lib/rubocop/cop/style/not.rb +1 -1
  168. data/lib/rubocop/cop/style/numeric_predicate.rb +5 -0
  169. data/lib/rubocop/cop/style/one_line_conditional.rb +1 -1
  170. data/lib/rubocop/cop/style/or_assignment.rb +2 -0
  171. data/lib/rubocop/cop/style/percent_q_literals.rb +1 -1
  172. data/lib/rubocop/cop/style/random_with_offset.rb +1 -0
  173. data/lib/rubocop/cop/style/redundant_begin.rb +13 -0
  174. data/lib/rubocop/cop/style/redundant_conditional.rb +1 -0
  175. data/lib/rubocop/cop/style/redundant_parentheses.rb +6 -1
  176. data/lib/rubocop/cop/style/redundant_return.rb +1 -0
  177. data/lib/rubocop/cop/style/rescue_modifier.rb +1 -0
  178. data/lib/rubocop/cop/style/rescue_standard_error.rb +1 -0
  179. data/lib/rubocop/cop/style/safe_navigation.rb +4 -0
  180. data/lib/rubocop/cop/style/semicolon.rb +4 -0
  181. data/lib/rubocop/cop/style/signal_exception.rb +1 -0
  182. data/lib/rubocop/cop/style/string_hash_keys.rb +1 -0
  183. data/lib/rubocop/cop/style/symbol_proc.rb +1 -8
  184. data/lib/rubocop/cop/style/trailing_comma_in_array_literal.rb +1 -0
  185. data/lib/rubocop/cop/style/trailing_method_end_statement.rb +1 -0
  186. data/lib/rubocop/cop/style/trailing_underscore_variable.rb +1 -0
  187. data/lib/rubocop/cop/style/unneeded_condition.rb +13 -2
  188. data/lib/rubocop/cop/style/unneeded_percent_q.rb +2 -0
  189. data/lib/rubocop/cop/style/word_array.rb +13 -1
  190. data/lib/rubocop/cop/team.rb +1 -0
  191. data/lib/rubocop/cop/variable_force.rb +5 -0
  192. data/lib/rubocop/cop/variable_force/assignment.rb +4 -0
  193. data/lib/rubocop/cop/variable_force/branch.rb +4 -0
  194. data/lib/rubocop/cop/variable_force/branchable.rb +2 -0
  195. data/lib/rubocop/cop/variable_force/scope.rb +6 -0
  196. data/lib/rubocop/cop/variable_force/variable_table.rb +1 -0
  197. data/lib/rubocop/file_finder.rb +2 -0
  198. data/lib/rubocop/formatter/disabled_config_formatter.rb +4 -4
  199. data/lib/rubocop/formatter/file_list_formatter.rb +1 -0
  200. data/lib/rubocop/formatter/simple_text_formatter.rb +1 -0
  201. data/lib/rubocop/options.rb +16 -0
  202. data/lib/rubocop/path_util.rb +16 -1
  203. data/lib/rubocop/processed_source.rb +4 -0
  204. data/lib/rubocop/remote_config.rb +6 -1
  205. data/lib/rubocop/result_cache.rb +1 -0
  206. data/lib/rubocop/rspec/cop_helper.rb +3 -5
  207. data/lib/rubocop/rspec/shared_examples.rb +1 -9
  208. data/lib/rubocop/runner.rb +4 -0
  209. data/lib/rubocop/target_finder.rb +2 -0
  210. data/lib/rubocop/version.rb +1 -1
  211. metadata +7 -2
@@ -36,12 +36,14 @@ module RuboCop
36
36
  def match_path?(pattern, path)
37
37
  case pattern
38
38
  when String
39
- File.fnmatch?(pattern, path, File::FNM_PATHNAME | File::FNM_EXTGLOB)
39
+ File.fnmatch?(pattern, path, File::FNM_PATHNAME | File::FNM_EXTGLOB) ||
40
+ hidden_file_in_not_hidden_dir?(pattern, path)
40
41
  when Regexp
41
42
  begin
42
43
  path =~ pattern
43
44
  rescue ArgumentError => e
44
45
  return false if e.message.start_with?('invalid byte sequence')
46
+
45
47
  raise e
46
48
  end
47
49
  end
@@ -59,5 +61,18 @@ module RuboCop
59
61
  def self.reset_pwd
60
62
  @pwd = nil
61
63
  end
64
+
65
+ def hidden_file_in_not_hidden_dir?(pattern, path)
66
+ File.fnmatch?(
67
+ pattern, path,
68
+ File::FNM_PATHNAME | File::FNM_EXTGLOB | File::FNM_DOTMATCH
69
+ ) && File.basename(path).start_with?('.') && !hidden_dir?(path)
70
+ end
71
+
72
+ def hidden_dir?(path)
73
+ File.dirname(path).split(File::SEPARATOR).any? do |dir|
74
+ dir.start_with?('.')
75
+ end
76
+ end
62
77
  end
63
78
  end
@@ -46,6 +46,7 @@ module RuboCop
46
46
 
47
47
  def ast_with_comments
48
48
  return if !ast || !comments
49
+
49
50
  @ast_with_comments ||= Parser::Source::Comment.associate(ast, comments)
50
51
  end
51
52
 
@@ -58,6 +59,7 @@ module RuboCop
58
59
  result = []
59
60
  all_lines.each_with_index do |line, ix|
60
61
  break if ix >= last_token_line && line == '__END__'
62
+
61
63
  result << line
62
64
  end
63
65
  result
@@ -70,6 +72,7 @@ module RuboCop
70
72
 
71
73
  def valid_syntax?
72
74
  return false if @parser_error
75
+
73
76
  @diagnostics.none? { |d| %i[error fatal].include?(d.level) }
74
77
  end
75
78
 
@@ -112,6 +115,7 @@ module RuboCop
112
115
 
113
116
  def start_with?(string)
114
117
  return false if self[0].nil?
118
+
115
119
  self[0].start_with?(string)
116
120
  end
117
121
 
@@ -21,6 +21,7 @@ module RuboCop
21
21
  request do |response|
22
22
  next if response.is_a?(Net::HTTPNotModified)
23
23
  next if response.is_a?(SocketError)
24
+
24
25
  File.open cache_path, 'w' do |io|
25
26
  io.write response.body
26
27
  end
@@ -60,7 +61,11 @@ module RuboCop
60
61
  when Net::HTTPRedirection
61
62
  request(URI.parse(response['location']), limit - 1, &block)
62
63
  else
63
- response.error!
64
+ begin
65
+ response.error!
66
+ rescue StandardError => e
67
+ raise e, "#{e.message} while downloading remote config file #{uri}"
68
+ end
64
69
  end
65
70
  end
66
71
 
@@ -18,6 +18,7 @@ module RuboCop
18
18
  # there's parallel execution and the cache is shared.
19
19
  def self.cleanup(config_store, verbose, cache_root = nil)
20
20
  return if inhibit_cleanup # OPTIMIZE: For faster testing
21
+
21
22
  cache_root ||= cache_root(config_store)
22
23
  return unless File.exist?(cache_root)
23
24
 
@@ -15,19 +15,15 @@ module CopHelper
15
15
  end
16
16
 
17
17
  def inspect_source(source, file = nil)
18
- if source.is_a?(Array) && source.size == 1
19
- raise "Don't use an array for a single line of code: #{source}"
20
- end
21
18
  RuboCop::Formatter::DisabledConfigFormatter.config_to_allow_offenses = {}
22
19
  RuboCop::Formatter::DisabledConfigFormatter.detected_styles = {}
23
20
  processed_source = parse_source(source, file)
24
21
  raise 'Error parsing example code' unless processed_source.valid_syntax?
22
+
25
23
  _investigate(cop, processed_source)
26
24
  end
27
25
 
28
26
  def parse_source(source, file = nil)
29
- source = source.join($RS) if source.is_a?(Array)
30
-
31
27
  if file && file.respond_to?(:write)
32
28
  file.write(source)
33
29
  file.rewind
@@ -56,6 +52,7 @@ module CopHelper
56
52
  cop.instance_variable_set(:@corrections, [])
57
53
  new_source = autocorrect_source(source, file)
58
54
  return new_source if new_source == source
55
+
59
56
  source = new_source
60
57
  end
61
58
  end
@@ -63,6 +60,7 @@ module CopHelper
63
60
  def _investigate(cop, processed_source)
64
61
  forces = RuboCop::Cop::Force.all.each_with_object([]) do |klass, instances|
65
62
  next unless cop.join_force?(klass)
63
+
66
64
  instances << klass.new([cop])
67
65
  end
68
66
 
@@ -2,13 +2,6 @@
2
2
 
3
3
  # `cop` and `source` must be declared with #let.
4
4
 
5
- shared_examples_for 'accepts' do
6
- it 'accepts' do
7
- inspect_source(source)
8
- expect(cop.offenses).to be_empty
9
- end
10
- end
11
-
12
5
  shared_examples_for 'misaligned' do |annotated_source, used_style|
13
6
  config_to_allow_offenses = if used_style
14
7
  { 'EnforcedStyleAlignWith' => used_style.to_s }
@@ -42,8 +35,7 @@ shared_examples_for 'aligned' do |alignment_base, arg, end_kw, name|
42
35
  name ||= alignment_base
43
36
  name = name.gsub(/\n/, ' <newline>')
44
37
  it "accepts matching #{name} ... end" do
45
- inspect_source(["#{alignment_base} #{arg}",
46
- end_kw])
38
+ inspect_source("#{alignment_base} #{arg}\n#{end_kw}")
47
39
  expect(cop.offenses).to be_empty
48
40
  end
49
41
  end
@@ -80,6 +80,7 @@ module RuboCop
80
80
 
81
81
  if offenses.any? { |o| considered_failure?(o) }
82
82
  break false if @options[:fail_fast]
83
+
83
84
  next false
84
85
  end
85
86
 
@@ -98,6 +99,9 @@ module RuboCop
98
99
  file_started(file)
99
100
 
100
101
  offenses = file_offenses(file)
102
+ if @options[:display_only_fail_level_offenses]
103
+ offenses = offenses.select { |o| considered_failure?(o) }
104
+ end
101
105
  formatter_set.file_finished(file, offenses)
102
106
  offenses
103
107
  rescue InfiniteCorrectionLoop => e
@@ -74,6 +74,7 @@ module RuboCop
74
74
  def to_inspect?(file, hidden_files, base_dir_config)
75
75
  return false if base_dir_config.file_to_exclude?(file)
76
76
  return true if !hidden_files.include?(file) && ruby_file?(file)
77
+
77
78
  base_dir_config.file_to_include?(file)
78
79
  end
79
80
 
@@ -141,6 +142,7 @@ module RuboCop
141
142
 
142
143
  def ruby_executable?(file)
143
144
  return false unless File.extname(file).empty? && File.exist?(file)
145
+
144
146
  first_line = File.open(file, &:readline)
145
147
  !(first_line =~ /#!.*(#{ruby_interpreters(file).join('|')})/).nil?
146
148
  rescue EOFError, ArgumentError => e
@@ -3,7 +3,7 @@
3
3
  module RuboCop
4
4
  # This module holds the RuboCop version information.
5
5
  module Version
6
- STRING = '0.58.2'.freeze
6
+ STRING = '0.59.0'.freeze
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)'.freeze
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.58.2
4
+ version: 0.59.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: 2018-07-23 00:00:00.000000000 Z
13
+ date: 2018-09-09 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: jaro_winkler
@@ -186,6 +186,7 @@ files:
186
186
  - lib/rubocop/ast/node/block_node.rb
187
187
  - lib/rubocop/ast/node/case_node.rb
188
188
  - lib/rubocop/ast/node/def_node.rb
189
+ - lib/rubocop/ast/node/defined_node.rb
189
190
  - lib/rubocop/ast/node/ensure_node.rb
190
191
  - lib/rubocop/ast/node/for_node.rb
191
192
  - lib/rubocop/ast/node/hash_node.rb
@@ -225,6 +226,7 @@ files:
225
226
  - lib/rubocop/cop/autocorrect_logic.rb
226
227
  - lib/rubocop/cop/badge.rb
227
228
  - lib/rubocop/cop/bundler/duplicated_gem.rb
229
+ - lib/rubocop/cop/bundler/gem_comment.rb
228
230
  - lib/rubocop/cop/bundler/insecure_protocol_source.rb
229
231
  - lib/rubocop/cop/bundler/ordered_gems.rb
230
232
  - lib/rubocop/cop/commissioner.rb
@@ -446,6 +448,7 @@ files:
446
448
  - lib/rubocop/cop/mixin/frozen_string_literal.rb
447
449
  - lib/rubocop/cop/mixin/hash_alignment.rb
448
450
  - lib/rubocop/cop/mixin/heredoc.rb
451
+ - lib/rubocop/cop/mixin/ignored_methods.rb
449
452
  - lib/rubocop/cop/mixin/ignored_pattern.rb
450
453
  - lib/rubocop/cop/mixin/integer_node.rb
451
454
  - lib/rubocop/cop/mixin/match_range.rb
@@ -499,6 +502,7 @@ files:
499
502
  - lib/rubocop/cop/performance/caller.rb
500
503
  - lib/rubocop/cop/performance/case_when_splat.rb
501
504
  - lib/rubocop/cop/performance/casecmp.rb
505
+ - lib/rubocop/cop/performance/chain_array_allocation.rb
502
506
  - lib/rubocop/cop/performance/compare_with_block.rb
503
507
  - lib/rubocop/cop/performance/count.rb
504
508
  - lib/rubocop/cop/performance/detect.rb
@@ -656,6 +660,7 @@ files:
656
660
  - lib/rubocop/cop/style/multiline_if_modifier.rb
657
661
  - lib/rubocop/cop/style/multiline_if_then.rb
658
662
  - lib/rubocop/cop/style/multiline_memoization.rb
663
+ - lib/rubocop/cop/style/multiline_method_signature.rb
659
664
  - lib/rubocop/cop/style/multiline_ternary_operator.rb
660
665
  - lib/rubocop/cop/style/multiple_comparison.rb
661
666
  - lib/rubocop/cop/style/mutable_constant.rb