rubocop 0.49.1 → 0.50.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (292) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -3
  3. data/bin/rubocop +1 -1
  4. data/config/default.yml +160 -99
  5. data/config/disabled.yml +4 -5
  6. data/config/enabled.yml +149 -47
  7. data/lib/rubocop.rb +41 -14
  8. data/lib/rubocop/ast/builder.rb +4 -1
  9. data/lib/rubocop/ast/node.rb +36 -42
  10. data/lib/rubocop/ast/node/args_node.rb +1 -13
  11. data/lib/rubocop/ast/node/array_node.rb +9 -0
  12. data/lib/rubocop/ast/node/block_node.rb +9 -0
  13. data/lib/rubocop/ast/node/def_node.rb +71 -0
  14. data/lib/rubocop/ast/node/for_node.rb +8 -0
  15. data/lib/rubocop/ast/node/if_node.rb +10 -2
  16. data/lib/rubocop/ast/node/mixin/collection_node.rb +15 -0
  17. data/lib/rubocop/ast/node/mixin/method_dispatch_node.rb +174 -0
  18. data/lib/rubocop/ast/node/mixin/method_identifier_predicates.rb +89 -0
  19. data/lib/rubocop/ast/node/mixin/parameterized_node.rb +18 -31
  20. data/lib/rubocop/ast/node/regexp_node.rb +35 -0
  21. data/lib/rubocop/ast/node/send_node.rb +1 -154
  22. data/lib/rubocop/ast/node/super_node.rb +3 -24
  23. data/lib/rubocop/ast/node/yield_node.rb +21 -0
  24. data/lib/rubocop/ast/traversal.rb +6 -6
  25. data/lib/rubocop/cli.rb +7 -3
  26. data/lib/rubocop/config.rb +45 -8
  27. data/lib/rubocop/config_loader.rb +7 -5
  28. data/lib/rubocop/cop/bundler/duplicated_gem.rb +3 -3
  29. data/lib/rubocop/cop/bundler/insecure_protocol_source.rb +64 -0
  30. data/lib/rubocop/cop/bundler/ordered_gems.rb +12 -12
  31. data/lib/rubocop/cop/commissioner.rb +8 -2
  32. data/lib/rubocop/cop/cop.rb +3 -1
  33. data/lib/rubocop/cop/generator.rb +94 -21
  34. data/lib/rubocop/cop/internal_affairs.rb +3 -0
  35. data/lib/rubocop/cop/internal_affairs/node_type_predicate.rb +14 -3
  36. data/lib/rubocop/cop/internal_affairs/offense_location_keyword.rb +43 -0
  37. data/lib/rubocop/cop/internal_affairs/redundant_location_argument.rb +46 -0
  38. data/lib/rubocop/cop/internal_affairs/redundant_message_argument.rb +49 -0
  39. data/lib/rubocop/cop/internal_affairs/useless_message_assertion.rb +1 -1
  40. data/lib/rubocop/cop/layout/access_modifier_indentation.rb +2 -3
  41. data/lib/rubocop/cop/layout/align_array.rb +2 -2
  42. data/lib/rubocop/cop/layout/align_hash.rb +2 -2
  43. data/lib/rubocop/cop/layout/align_parameters.rb +5 -11
  44. data/lib/rubocop/cop/layout/closing_parenthesis_indentation.rb +5 -5
  45. data/lib/rubocop/cop/layout/comment_indentation.rb +1 -1
  46. data/lib/rubocop/cop/layout/dot_position.rb +9 -0
  47. data/lib/rubocop/cop/layout/else_alignment.rb +30 -13
  48. data/lib/rubocop/cop/layout/empty_line_between_defs.rb +4 -0
  49. data/lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb +20 -4
  50. data/lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb +3 -3
  51. data/lib/rubocop/cop/layout/empty_lines_around_method_body.rb +3 -3
  52. data/lib/rubocop/cop/layout/first_method_parameter_line_break.rb +3 -3
  53. data/lib/rubocop/cop/layout/first_parameter_indentation.rb +5 -2
  54. data/lib/rubocop/cop/layout/indent_heredoc.rb +19 -24
  55. data/lib/rubocop/cop/layout/indentation_consistency.rb +1 -2
  56. data/lib/rubocop/cop/layout/indentation_width.rb +12 -8
  57. data/lib/rubocop/cop/layout/leading_comment_space.rb +33 -18
  58. data/lib/rubocop/cop/layout/multiline_method_call_indentation.rb +20 -17
  59. data/lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb +3 -3
  60. data/lib/rubocop/cop/layout/multiline_operation_indentation.rb +6 -0
  61. data/lib/rubocop/cop/layout/space_after_colon.rb +7 -0
  62. data/lib/rubocop/cop/layout/space_after_comma.rb +10 -0
  63. data/lib/rubocop/cop/layout/space_after_method_name.rb +5 -3
  64. data/lib/rubocop/cop/layout/space_after_not.rb +1 -1
  65. data/lib/rubocop/cop/layout/space_around_block_parameters.rb +13 -4
  66. data/lib/rubocop/cop/layout/space_around_keyword.rb +9 -5
  67. data/lib/rubocop/cop/layout/space_before_block_braces.rb +54 -5
  68. data/lib/rubocop/cop/layout/space_before_comment.rb +7 -0
  69. data/lib/rubocop/cop/layout/space_before_semicolon.rb +7 -0
  70. data/lib/rubocop/cop/layout/space_inside_array_percent_literal.rb +1 -1
  71. data/lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb +1 -1
  72. data/lib/rubocop/cop/layout/space_inside_range_literal.rb +1 -1
  73. data/lib/rubocop/cop/layout/space_inside_string_interpolation.rb +8 -4
  74. data/lib/rubocop/cop/layout/tab.rb +1 -1
  75. data/lib/rubocop/cop/lint/ambiguous_block_association.rb +4 -2
  76. data/lib/rubocop/cop/lint/assignment_in_condition.rb +15 -1
  77. data/lib/rubocop/cop/lint/block_alignment.rb +15 -6
  78. data/lib/rubocop/cop/lint/boolean_symbol.rb +38 -0
  79. data/lib/rubocop/cop/lint/condition_position.rb +5 -1
  80. data/lib/rubocop/cop/lint/debugger.rb +16 -9
  81. data/lib/rubocop/cop/lint/def_end_alignment.rb +4 -4
  82. data/lib/rubocop/cop/lint/duplicate_case_condition.rb +3 -3
  83. data/lib/rubocop/cop/lint/duplicate_methods.rb +73 -5
  84. data/lib/rubocop/cop/lint/duplicated_key.rb +1 -1
  85. data/lib/rubocop/cop/lint/each_with_object_argument.rb +1 -1
  86. data/lib/rubocop/cop/lint/else_layout.rb +1 -1
  87. data/lib/rubocop/cop/lint/empty_expression.rb +1 -1
  88. data/lib/rubocop/cop/lint/empty_interpolation.rb +1 -1
  89. data/lib/rubocop/cop/lint/empty_when.rb +1 -1
  90. data/lib/rubocop/cop/lint/ensure_return.rb +1 -1
  91. data/lib/rubocop/cop/lint/float_out_of_range.rb +5 -5
  92. data/lib/rubocop/cop/lint/format_parameter_mismatch.rb +35 -40
  93. data/lib/rubocop/cop/lint/handle_exceptions.rb +1 -1
  94. data/lib/rubocop/cop/lint/ineffective_access_modifier.rb +18 -13
  95. data/lib/rubocop/cop/lint/inherit_exception.rb +8 -7
  96. data/lib/rubocop/cop/lint/interpolation_check.rb +36 -0
  97. data/lib/rubocop/cop/lint/literal_in_condition.rb +3 -3
  98. data/lib/rubocop/cop/lint/literal_in_interpolation.rb +1 -1
  99. data/lib/rubocop/cop/lint/multiple_compare.rb +1 -1
  100. data/lib/rubocop/cop/lint/nested_method_definition.rb +5 -7
  101. data/lib/rubocop/cop/lint/next_without_accumulator.rb +1 -1
  102. data/lib/rubocop/cop/lint/percent_string_array.rb +3 -12
  103. data/lib/rubocop/cop/lint/percent_symbol_array.rb +1 -1
  104. data/lib/rubocop/cop/lint/rand_one.rb +7 -1
  105. data/lib/rubocop/cop/lint/redundant_with_index.rb +77 -0
  106. data/lib/rubocop/cop/lint/require_parentheses.rb +1 -1
  107. data/lib/rubocop/cop/lint/rescue_exception.rb +1 -1
  108. data/lib/rubocop/cop/lint/rescue_type.rb +13 -6
  109. data/lib/rubocop/cop/lint/rescue_without_error_class.rb +38 -0
  110. data/lib/rubocop/cop/lint/return_in_void_context.rb +63 -0
  111. data/lib/rubocop/cop/lint/script_permission.rb +6 -0
  112. data/lib/rubocop/cop/lint/syntax.rb +17 -20
  113. data/lib/rubocop/cop/lint/unified_integer.rb +3 -2
  114. data/lib/rubocop/cop/lint/unneeded_disable.rb +1 -1
  115. data/lib/rubocop/cop/lint/unneeded_splat_expansion.rb +1 -1
  116. data/lib/rubocop/cop/lint/unreachable_code.rb +53 -8
  117. data/lib/rubocop/cop/lint/uri_escape_unescape.rb +74 -0
  118. data/lib/rubocop/cop/lint/uri_regexp.rb +73 -0
  119. data/lib/rubocop/cop/lint/useless_access_modifier.rb +4 -8
  120. data/lib/rubocop/cop/lint/useless_setter_call.rb +10 -11
  121. data/lib/rubocop/cop/lint/void.rb +29 -23
  122. data/lib/rubocop/cop/metrics/line_length.rb +2 -2
  123. data/lib/rubocop/cop/metrics/method_length.rb +8 -3
  124. data/lib/rubocop/cop/metrics/parameter_lists.rb +5 -2
  125. data/lib/rubocop/cop/mixin/autocorrect_alignment.rb +1 -1
  126. data/lib/rubocop/cop/mixin/enforce_superclass.rb +2 -2
  127. data/lib/rubocop/cop/mixin/first_element_line_break.rb +12 -3
  128. data/lib/rubocop/cop/mixin/heredoc.rb +28 -0
  129. data/lib/rubocop/cop/mixin/method_complexity.rb +9 -6
  130. data/lib/rubocop/cop/mixin/multiline_expression_indentation.rb +68 -31
  131. data/lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb +18 -0
  132. data/lib/rubocop/cop/mixin/negative_conditional.rb +1 -1
  133. data/lib/rubocop/cop/mixin/percent_array.rb +52 -0
  134. data/lib/rubocop/cop/mixin/string_help.rb +1 -1
  135. data/lib/rubocop/cop/{style → naming}/accessor_method_name.rb +11 -12
  136. data/lib/rubocop/cop/{style → naming}/ascii_identifiers.rb +1 -1
  137. data/lib/rubocop/cop/{style/op_method.rb → naming/binary_operator_parameter_name.rb} +2 -2
  138. data/lib/rubocop/cop/{style → naming}/class_and_module_camel_case.rb +1 -1
  139. data/lib/rubocop/cop/{style → naming}/constant_name.rb +1 -1
  140. data/lib/rubocop/cop/{style → naming}/file_name.rb +8 -4
  141. data/lib/rubocop/cop/naming/heredoc_delimiter_case.rb +68 -0
  142. data/lib/rubocop/cop/naming/heredoc_delimiter_naming.rb +58 -0
  143. data/lib/rubocop/cop/{style → naming}/method_name.rb +1 -1
  144. data/lib/rubocop/cop/{style → naming}/predicate_name.rb +6 -7
  145. data/lib/rubocop/cop/{style → naming}/variable_name.rb +11 -15
  146. data/lib/rubocop/cop/{style → naming}/variable_number.rb +1 -1
  147. data/lib/rubocop/cop/performance/caller.rb +39 -11
  148. data/lib/rubocop/cop/performance/casecmp.rb +4 -4
  149. data/lib/rubocop/cop/performance/compare_with_block.rb +4 -4
  150. data/lib/rubocop/cop/performance/double_start_end_with.rb +4 -4
  151. data/lib/rubocop/cop/performance/end_with.rb +3 -3
  152. data/lib/rubocop/cop/performance/fixed_size.rb +1 -1
  153. data/lib/rubocop/cop/performance/hash_each_methods.rb +66 -25
  154. data/lib/rubocop/cop/performance/lstrip_rstrip.rb +2 -2
  155. data/lib/rubocop/cop/performance/range_include.rb +2 -2
  156. data/lib/rubocop/cop/performance/redundant_block_call.rb +6 -6
  157. data/lib/rubocop/cop/performance/redundant_match.rb +5 -5
  158. data/lib/rubocop/cop/performance/redundant_merge.rb +39 -23
  159. data/lib/rubocop/cop/performance/redundant_sort_by.rb +2 -2
  160. data/lib/rubocop/cop/performance/regexp_match.rb +13 -5
  161. data/lib/rubocop/cop/performance/size.rb +1 -1
  162. data/lib/rubocop/cop/performance/start_with.rb +3 -3
  163. data/lib/rubocop/cop/performance/times_map.rb +23 -12
  164. data/lib/rubocop/cop/performance/unfreeze_string.rb +50 -0
  165. data/lib/rubocop/cop/performance/uri_default_parser.rb +47 -0
  166. data/lib/rubocop/cop/rails/active_support_aliases.rb +1 -1
  167. data/lib/rubocop/cop/rails/delegate.rb +36 -7
  168. data/lib/rubocop/cop/rails/delegate_allow_blank.rb +1 -1
  169. data/lib/rubocop/cop/rails/enum_uniqueness.rb +2 -2
  170. data/lib/rubocop/cop/rails/file_path.rb +3 -4
  171. data/lib/rubocop/cop/rails/find_each.rb +1 -1
  172. data/lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb +48 -0
  173. data/lib/rubocop/cop/rails/http_positional_arguments.rb +5 -5
  174. data/lib/rubocop/cop/rails/not_null_column.rb +1 -1
  175. data/lib/rubocop/cop/rails/pluralization_grammar.rb +2 -2
  176. data/lib/rubocop/cop/rails/relative_date_constant.rb +1 -1
  177. data/lib/rubocop/cop/rails/request_referer.rb +2 -2
  178. data/lib/rubocop/cop/rails/reversible_migration.rb +12 -12
  179. data/lib/rubocop/cop/rails/save_bang.rb +8 -6
  180. data/lib/rubocop/cop/rails/scope_args.rb +1 -1
  181. data/lib/rubocop/cop/security/eval.rb +2 -2
  182. data/lib/rubocop/cop/security/json_load.rb +2 -2
  183. data/lib/rubocop/cop/security/marshal_load.rb +2 -2
  184. data/lib/rubocop/cop/security/yaml_load.rb +2 -2
  185. data/lib/rubocop/cop/style/alias.rb +44 -20
  186. data/lib/rubocop/cop/style/and_or.rb +48 -34
  187. data/lib/rubocop/cop/style/auto_resource_cleanup.rb +1 -1
  188. data/lib/rubocop/cop/style/block_comments.rb +3 -1
  189. data/lib/rubocop/cop/style/block_delimiters.rb +2 -1
  190. data/lib/rubocop/cop/style/command_literal.rb +20 -9
  191. data/lib/rubocop/cop/style/conditional_assignment.rb +30 -28
  192. data/lib/rubocop/cop/style/copyright.rb +10 -10
  193. data/lib/rubocop/cop/style/def_with_parentheses.rb +6 -5
  194. data/lib/rubocop/cop/style/dir.rb +52 -0
  195. data/lib/rubocop/cop/style/documentation_method.rb +2 -6
  196. data/lib/rubocop/cop/style/empty_case_condition.rb +1 -1
  197. data/lib/rubocop/cop/style/empty_else.rb +3 -2
  198. data/lib/rubocop/cop/style/empty_literal.rb +1 -2
  199. data/lib/rubocop/cop/style/empty_method.rb +27 -17
  200. data/lib/rubocop/cop/style/flip_flop.rb +2 -2
  201. data/lib/rubocop/cop/style/frozen_string_literal_comment.rb +1 -1
  202. data/lib/rubocop/cop/style/guard_clause.rb +4 -2
  203. data/lib/rubocop/cop/style/hash_syntax.rb +10 -10
  204. data/lib/rubocop/cop/style/identical_conditional_branches.rb +5 -1
  205. data/lib/rubocop/cop/style/if_with_semicolon.rb +1 -1
  206. data/lib/rubocop/cop/style/implicit_runtime_error.rb +4 -3
  207. data/lib/rubocop/cop/style/inline_comment.rb +1 -1
  208. data/lib/rubocop/cop/style/inverse_methods.rb +20 -8
  209. data/lib/rubocop/cop/style/lambda.rb +19 -9
  210. data/lib/rubocop/cop/style/lambda_call.rb +22 -1
  211. data/lib/rubocop/cop/style/method_call_with_args_parentheses.rb +4 -20
  212. data/lib/rubocop/cop/style/method_call_without_args_parentheses.rb +6 -4
  213. data/lib/rubocop/cop/style/method_def_parentheses.rb +18 -26
  214. data/lib/rubocop/cop/style/method_missing.rb +5 -18
  215. data/lib/rubocop/cop/style/min_max.rb +67 -0
  216. data/lib/rubocop/cop/style/missing_else.rb +16 -3
  217. data/lib/rubocop/cop/style/mixin_grouping.rb +2 -2
  218. data/lib/rubocop/cop/style/module_function.rb +8 -4
  219. data/lib/rubocop/cop/style/multiline_if_modifier.rb +5 -1
  220. data/lib/rubocop/cop/style/multiline_memoization.rb +25 -3
  221. data/lib/rubocop/cop/style/multiline_ternary_operator.rb +1 -1
  222. data/lib/rubocop/cop/style/multiple_comparison.rb +1 -1
  223. data/lib/rubocop/cop/style/mutable_constant.rb +2 -6
  224. data/lib/rubocop/cop/style/negated_if.rb +8 -4
  225. data/lib/rubocop/cop/style/nested_parenthesized_calls.rb +8 -8
  226. data/lib/rubocop/cop/style/nested_ternary_operator.rb +1 -1
  227. data/lib/rubocop/cop/style/non_nil_check.rb +14 -14
  228. data/lib/rubocop/cop/style/numeric_literal_prefix.rb +6 -2
  229. data/lib/rubocop/cop/style/numeric_literals.rb +2 -2
  230. data/lib/rubocop/cop/style/numeric_predicate.rb +8 -4
  231. data/lib/rubocop/cop/style/one_line_conditional.rb +8 -3
  232. data/lib/rubocop/cop/style/option_hash.rb +1 -1
  233. data/lib/rubocop/cop/style/optional_arguments.rb +1 -2
  234. data/lib/rubocop/cop/style/or_assignment.rb +88 -0
  235. data/lib/rubocop/cop/style/parallel_assignment.rb +2 -2
  236. data/lib/rubocop/cop/style/parentheses_around_condition.rb +12 -11
  237. data/lib/rubocop/cop/style/percent_literal_delimiters.rb +1 -1
  238. data/lib/rubocop/cop/style/percent_q_literals.rb +2 -2
  239. data/lib/rubocop/cop/style/perl_backrefs.rb +1 -1
  240. data/lib/rubocop/cop/style/proc.rb +1 -1
  241. data/lib/rubocop/cop/style/raise_args.rb +16 -17
  242. data/lib/rubocop/cop/style/redundant_begin.rb +6 -5
  243. data/lib/rubocop/cop/style/redundant_conditional.rb +95 -0
  244. data/lib/rubocop/cop/style/redundant_freeze.rb +1 -1
  245. data/lib/rubocop/cop/style/redundant_parentheses.rb +13 -11
  246. data/lib/rubocop/cop/style/redundant_return.rb +23 -11
  247. data/lib/rubocop/cop/style/redundant_self.rb +18 -9
  248. data/lib/rubocop/cop/style/regexp_literal.rb +12 -4
  249. data/lib/rubocop/cop/style/rescue_modifier.rb +1 -1
  250. data/lib/rubocop/cop/style/return_nil.rb +98 -0
  251. data/lib/rubocop/cop/style/safe_navigation.rb +80 -43
  252. data/lib/rubocop/cop/style/single_line_block_params.rb +14 -13
  253. data/lib/rubocop/cop/style/single_line_methods.rb +9 -13
  254. data/lib/rubocop/cop/style/special_global_vars.rb +3 -3
  255. data/lib/rubocop/cop/style/stabby_lambda_parentheses.rb +17 -39
  256. data/lib/rubocop/cop/style/string_literals_in_interpolation.rb +22 -1
  257. data/lib/rubocop/cop/style/struct_inheritance.rb +1 -1
  258. data/lib/rubocop/cop/style/symbol_array.rb +5 -25
  259. data/lib/rubocop/cop/style/symbol_literal.rb +1 -1
  260. data/lib/rubocop/cop/style/symbol_proc.rb +3 -18
  261. data/lib/rubocop/cop/style/ternary_parentheses.rb +14 -10
  262. data/lib/rubocop/cop/style/trailing_underscore_variable.rb +28 -9
  263. data/lib/rubocop/cop/style/trivial_accessors.rb +39 -56
  264. data/lib/rubocop/cop/style/unless_else.rb +1 -1
  265. data/lib/rubocop/cop/style/unneeded_capital_w.rb +1 -1
  266. data/lib/rubocop/cop/style/unneeded_interpolation.rb +1 -1
  267. data/lib/rubocop/cop/style/unneeded_percent_q.rb +1 -1
  268. data/lib/rubocop/cop/style/variable_interpolation.rb +8 -3
  269. data/lib/rubocop/cop/style/word_array.rb +7 -24
  270. data/lib/rubocop/cop/style/yoda_condition.rb +49 -14
  271. data/lib/rubocop/cop/style/zero_length_predicate.rb +25 -18
  272. data/lib/rubocop/cop/team.rb +16 -8
  273. data/lib/rubocop/cop/util.rb +11 -0
  274. data/lib/rubocop/formatter/disabled_config_formatter.rb +1 -1
  275. data/lib/rubocop/formatter/formatter_set.rb +2 -1
  276. data/lib/rubocop/formatter/offense_count_formatter.rb +2 -0
  277. data/lib/rubocop/formatter/simple_text_formatter.rb +1 -1
  278. data/lib/rubocop/formatter/tap_formatter.rb +71 -0
  279. data/lib/rubocop/formatter/worst_offenders_formatter.rb +2 -0
  280. data/lib/rubocop/node_pattern.rb +44 -26
  281. data/lib/rubocop/options.rb +1 -0
  282. data/lib/rubocop/processed_source.rb +3 -1
  283. data/lib/rubocop/remote_config.rb +5 -1
  284. data/lib/rubocop/result_cache.rb +1 -0
  285. data/lib/rubocop/rspec/cop_helper.rb +10 -10
  286. data/lib/rubocop/rspec/expect_offense.rb +6 -8
  287. data/lib/rubocop/rspec/shared_examples.rb +8 -8
  288. data/lib/rubocop/string_util.rb +2 -0
  289. data/lib/rubocop/version.rb +1 -1
  290. metadata +51 -18
  291. data/lib/rubocop/cop/mixin/access_modifier_node.rb +0 -41
  292. data/lib/rubocop/cop/mixin/on_method_def.rb +0 -44
@@ -319,6 +319,7 @@ module RuboCop
319
319
  ' [fi]les',
320
320
  ' [o]ffenses',
321
321
  ' [w]orst',
322
+ ' [t]ap',
322
323
  ' custom formatter class name'],
323
324
  out: ['Write output to a file instead of STDOUT.',
324
325
  'This option applies to the previously',
@@ -107,7 +107,8 @@ module RuboCop
107
107
  [ast, comments, tokens]
108
108
  end
109
109
 
110
- def parser_class(ruby_version) # rubocop:disable Metrics/MethodLength
110
+ # rubocop:disable Metrics/MethodLength, Metrics/CyclomaticComplexity
111
+ def parser_class(ruby_version)
111
112
  case ruby_version
112
113
  when 1.9
113
114
  require 'parser/ruby19'
@@ -131,6 +132,7 @@ module RuboCop
131
132
  raise ArgumentError, "Unknown Ruby version: #{ruby_version.inspect}"
132
133
  end
133
134
  end
135
+ # rubocop:enable Metrics/MethodLength, Metrics/CyclomaticComplexity
134
136
 
135
137
  def create_parser(ruby_version)
136
138
  builder = RuboCop::AST::Builder.new
@@ -17,6 +17,8 @@ module RuboCop
17
17
  return cache_path unless cache_path_expired?
18
18
 
19
19
  request do |response|
20
+ next if response.is_a?(Net::HTTPNotModified)
21
+ next if response.is_a?(SocketError)
20
22
  open cache_path, 'w' do |io|
21
23
  io.write response.body
22
24
  end
@@ -39,11 +41,13 @@ module RuboCop
39
41
  end
40
42
 
41
43
  handle_response(http.request(request), limit, &block)
44
+ rescue SocketError => err
45
+ handle_response(err, limit, &block)
42
46
  end
43
47
 
44
48
  def handle_response(response, limit, &block)
45
49
  case response
46
- when Net::HTTPSuccess
50
+ when Net::HTTPSuccess, Net::HTTPNotModified, SocketError
47
51
  yield response
48
52
  when Net::HTTPRedirection
49
53
  request(URI.parse(response['location']), limit - 1, &block)
@@ -133,6 +133,7 @@ module RuboCop
133
133
 
134
134
  def file_checksum(file, config_store)
135
135
  Digest::MD5.hexdigest(Dir.pwd + file + IO.read(file) +
136
+ File.stat(file).mode.to_s +
136
137
  config_store.for(file).to_s)
137
138
  rescue Errno::ENOENT
138
139
  # Spurious files that come and go should not cause a crash, at least not
@@ -10,15 +10,15 @@ module CopHelper
10
10
  let(:enabled_rails) { false }
11
11
  let(:rails_version) { false }
12
12
 
13
- def inspect_source_file(cop, source)
14
- Tempfile.open('tmp') { |f| inspect_source(cop, source, f) }
13
+ def inspect_source_file(source)
14
+ Tempfile.open('tmp') { |f| inspect_source(source, f) }
15
15
  end
16
16
 
17
- def inspect_gemfile(cop, source)
18
- inspect_source(cop, source, 'Gemfile')
17
+ def inspect_gemfile(source)
18
+ inspect_source(source, 'Gemfile')
19
19
  end
20
20
 
21
- def inspect_source(cop, source, file = nil)
21
+ def inspect_source(source, file = nil)
22
22
  if source.is_a?(Array) && source.size == 1
23
23
  raise "Don't use an array for a single line of code: #{source}"
24
24
  end
@@ -41,11 +41,11 @@ module CopHelper
41
41
  RuboCop::ProcessedSource.new(source, ruby_version, file)
42
42
  end
43
43
 
44
- def autocorrect_source_file(cop, source)
45
- Tempfile.open('tmp') { |f| autocorrect_source(cop, source, f) }
44
+ def autocorrect_source_file(source)
45
+ Tempfile.open('tmp') { |f| autocorrect_source(source, f) }
46
46
  end
47
47
 
48
- def autocorrect_source(cop, source, file = nil)
48
+ def autocorrect_source(source, file = nil)
49
49
  cop.instance_variable_get(:@options)[:auto_correct] = true
50
50
  processed_source = parse_source(source, file)
51
51
  _investigate(cop, processed_source)
@@ -55,10 +55,10 @@ module CopHelper
55
55
  corrector.rewrite
56
56
  end
57
57
 
58
- def autocorrect_source_with_loop(cop, source, file = nil)
58
+ def autocorrect_source_with_loop(source, file = nil)
59
59
  loop do
60
60
  cop.instance_variable_set(:@corrections, [])
61
- new_source = autocorrect_source(cop, source, file)
61
+ new_source = autocorrect_source(source, file)
62
62
  return new_source if new_source == source
63
63
  source = new_source
64
64
  end
@@ -23,7 +23,7 @@ module RuboCop
23
23
  #
24
24
  # @example Equivalent assertion without `expect_offense`
25
25
  #
26
- # inspect_source(cop, <<-RUBY.strip_indent)
26
+ # inspect_source(<<-RUBY.strip_indent)
27
27
  # a do
28
28
  # b
29
29
  # end.c
@@ -44,23 +44,21 @@ module RuboCop
44
44
  # that there were no offenses. The `expect_offenses` method has
45
45
  # to do more work by parsing out lines that contain carets.
46
46
  module ExpectOffense
47
- DEFAULT_FILENAME = 'example.rb'.freeze
48
-
49
- def expect_offense(source, filename = DEFAULT_FILENAME)
47
+ def expect_offense(source, file = nil)
50
48
  expected_annotations = AnnotatedSource.parse(source)
51
49
 
52
50
  if expected_annotations.plain_source == source
53
51
  raise 'Use expect_no_offenses to assert that no offenses are found'
54
52
  end
55
53
 
56
- inspect_source(cop, expected_annotations.plain_source, filename)
54
+ inspect_source(expected_annotations.plain_source, file)
57
55
  actual_annotations =
58
56
  expected_annotations.with_offense_annotations(cop.offenses)
59
- expect(expected_annotations.to_s).to eq(actual_annotations.to_s)
57
+ expect(actual_annotations.to_s).to eq(expected_annotations.to_s)
60
58
  end
61
59
 
62
- def expect_no_offenses(source, filename = DEFAULT_FILENAME)
63
- inspect_source(cop, source, filename)
60
+ def expect_no_offenses(source, file = nil)
61
+ inspect_source(source, file)
64
62
 
65
63
  expect(cop.offenses).to be_empty
66
64
  end
@@ -4,7 +4,7 @@
4
4
 
5
5
  shared_examples_for 'accepts' do
6
6
  it 'accepts' do
7
- inspect_source(cop, source)
7
+ inspect_source(source)
8
8
  expect(cop.offenses).to be_empty
9
9
  end
10
10
  end
@@ -12,7 +12,7 @@ end
12
12
  shared_examples_for 'mimics MRI 2.1' do |grep_mri_warning|
13
13
  if RUBY_ENGINE == 'ruby' && RUBY_VERSION.start_with?('2.1')
14
14
  it "mimics MRI #{RUBY_VERSION} built-in syntax checking" do
15
- inspect_source(cop, source)
15
+ inspect_source(source)
16
16
  offenses_by_mri = MRISyntaxChecker.offenses_for_source(
17
17
  source, cop.name, grep_mri_warning
18
18
  )
@@ -38,7 +38,7 @@ shared_examples_for 'misaligned' do |prefix, alignment_base, arg, end_kw, name|
38
38
  end_kw]
39
39
 
40
40
  it "registers an offense for mismatched #{name} ... end" do
41
- inspect_source(cop, source)
41
+ inspect_source(source)
42
42
  expect(cop.offenses.size).to eq(1)
43
43
  base_regexp = Regexp.escape(alignment_base)
44
44
  regexp = /`end` at 2, \d+ is not aligned with `#{base_regexp}` at 1,/
@@ -58,7 +58,7 @@ shared_examples_for 'misaligned' do |prefix, alignment_base, arg, end_kw, name|
58
58
  it "auto-corrects mismatched #{name} ... end" do
59
59
  aligned_source = ["#{prefix}#{alignment_base} #{arg}",
60
60
  "#{' ' * prefix.length}#{end_kw.strip}"].join("\n")
61
- corrected = autocorrect_source(cop, source)
61
+ corrected = autocorrect_source(source)
62
62
  expect(corrected).to eq(aligned_source)
63
63
  end
64
64
  end
@@ -67,15 +67,15 @@ shared_examples_for 'aligned' do |alignment_base, arg, end_kw, name|
67
67
  name ||= alignment_base
68
68
  name = name.gsub(/\n/, ' <newline>')
69
69
  it "accepts matching #{name} ... end" do
70
- inspect_source(cop, ["#{alignment_base} #{arg}",
71
- end_kw])
70
+ inspect_source(["#{alignment_base} #{arg}",
71
+ end_kw])
72
72
  expect(cop.offenses).to be_empty
73
73
  end
74
74
  end
75
75
 
76
76
  shared_examples_for 'debugger' do |name, src|
77
77
  it "reports an offense for a #{name} call" do
78
- inspect_source(cop, src)
78
+ inspect_source(src)
79
79
  src = [src] if src.is_a? String
80
80
  expect(cop.offenses.size).to eq(src.size)
81
81
  expect(cop.messages)
@@ -86,7 +86,7 @@ end
86
86
 
87
87
  shared_examples_for 'non-debugger' do |name, src|
88
88
  it "does not report an offense for #{name}" do
89
- inspect_source(cop, src)
89
+ inspect_source(src)
90
90
  expect(cop.offenses).to be_empty
91
91
  end
92
92
  end
@@ -46,6 +46,7 @@ module RuboCop
46
46
  compute_non_zero_distance(matched_count.to_f, transposition_count)
47
47
  end
48
48
 
49
+ # rubocop:disable Metrics/AbcSize
49
50
  def find_common_characters
50
51
  common_chars_of_shorter = Array.new(shorter.size)
51
52
  common_chars_of_longer = Array.new(longer.size)
@@ -68,6 +69,7 @@ module RuboCop
68
69
 
69
70
  [common_chars_of_shorter, common_chars_of_longer].map(&:compact)
70
71
  end
72
+ # rubocop:enable Metrics/AbcSize
71
73
 
72
74
  def count_transpositions(common_chars_a, common_chars_b)
73
75
  common_chars_a.size.times.count do |index|
@@ -3,7 +3,7 @@
3
3
  module RuboCop
4
4
  # This module holds the RuboCop version information.
5
5
  module Version
6
- STRING = '0.49.1'.freeze
6
+ STRING = '0.50.0'.freeze
7
7
 
8
8
  MSG = '%s (using Parser %s, running on %s %s %s)'.freeze
9
9
 
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.49.1
4
+ version: 0.50.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: 2017-05-29 00:00:00.000000000 Z
13
+ date: 2017-09-14 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rainbow
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ">="
20
20
  - !ruby/object:Gem::Version
21
- version: 1.99.1
21
+ version: 2.2.2
22
22
  - - "<"
23
23
  - !ruby/object:Gem::Version
24
24
  version: '3.0'
@@ -28,7 +28,7 @@ dependencies:
28
28
  requirements:
29
29
  - - ">="
30
30
  - !ruby/object:Gem::Version
31
- version: 1.99.1
31
+ version: 2.2.2
32
32
  - - "<"
33
33
  - !ruby/object:Gem::Version
34
34
  version: '3.0'
@@ -155,25 +155,31 @@ files:
155
155
  - lib/rubocop/ast/node/array_node.rb
156
156
  - lib/rubocop/ast/node/block_node.rb
157
157
  - lib/rubocop/ast/node/case_node.rb
158
+ - lib/rubocop/ast/node/def_node.rb
158
159
  - lib/rubocop/ast/node/ensure_node.rb
159
160
  - lib/rubocop/ast/node/for_node.rb
160
161
  - lib/rubocop/ast/node/hash_node.rb
161
162
  - lib/rubocop/ast/node/if_node.rb
162
163
  - lib/rubocop/ast/node/keyword_splat_node.rb
163
164
  - lib/rubocop/ast/node/mixin/binary_operator_node.rb
165
+ - lib/rubocop/ast/node/mixin/collection_node.rb
164
166
  - lib/rubocop/ast/node/mixin/conditional_node.rb
165
167
  - lib/rubocop/ast/node/mixin/hash_element_node.rb
168
+ - lib/rubocop/ast/node/mixin/method_dispatch_node.rb
169
+ - lib/rubocop/ast/node/mixin/method_identifier_predicates.rb
166
170
  - lib/rubocop/ast/node/mixin/modifier_node.rb
167
171
  - lib/rubocop/ast/node/mixin/parameterized_node.rb
168
172
  - lib/rubocop/ast/node/mixin/predicate_operator_node.rb
169
173
  - lib/rubocop/ast/node/or_node.rb
170
174
  - lib/rubocop/ast/node/pair_node.rb
175
+ - lib/rubocop/ast/node/regexp_node.rb
171
176
  - lib/rubocop/ast/node/resbody_node.rb
172
177
  - lib/rubocop/ast/node/send_node.rb
173
178
  - lib/rubocop/ast/node/super_node.rb
174
179
  - lib/rubocop/ast/node/until_node.rb
175
180
  - lib/rubocop/ast/node/when_node.rb
176
181
  - lib/rubocop/ast/node/while_node.rb
182
+ - lib/rubocop/ast/node/yield_node.rb
177
183
  - lib/rubocop/ast/sexp.rb
178
184
  - lib/rubocop/ast/traversal.rb
179
185
  - lib/rubocop/cached_data.rb
@@ -186,6 +192,7 @@ files:
186
192
  - lib/rubocop/cop/autocorrect_logic.rb
187
193
  - lib/rubocop/cop/badge.rb
188
194
  - lib/rubocop/cop/bundler/duplicated_gem.rb
195
+ - lib/rubocop/cop/bundler/insecure_protocol_source.rb
189
196
  - lib/rubocop/cop/bundler/ordered_gems.rb
190
197
  - lib/rubocop/cop/commissioner.rb
191
198
  - lib/rubocop/cop/cop.rb
@@ -195,6 +202,9 @@ files:
195
202
  - lib/rubocop/cop/ignored_node.rb
196
203
  - lib/rubocop/cop/internal_affairs.rb
197
204
  - lib/rubocop/cop/internal_affairs/node_type_predicate.rb
205
+ - lib/rubocop/cop/internal_affairs/offense_location_keyword.rb
206
+ - lib/rubocop/cop/internal_affairs/redundant_location_argument.rb
207
+ - lib/rubocop/cop/internal_affairs/redundant_message_argument.rb
198
208
  - lib/rubocop/cop/internal_affairs/useless_message_assertion.rb
199
209
  - lib/rubocop/cop/layout/access_modifier_indentation.rb
200
210
  - lib/rubocop/cop/layout/align_array.rb
@@ -271,6 +281,7 @@ files:
271
281
  - lib/rubocop/cop/lint/ambiguous_regexp_literal.rb
272
282
  - lib/rubocop/cop/lint/assignment_in_condition.rb
273
283
  - lib/rubocop/cop/lint/block_alignment.rb
284
+ - lib/rubocop/cop/lint/boolean_symbol.rb
274
285
  - lib/rubocop/cop/lint/circular_argument_reference.rb
275
286
  - lib/rubocop/cop/lint/condition_position.rb
276
287
  - lib/rubocop/cop/lint/debugger.rb
@@ -294,6 +305,7 @@ files:
294
305
  - lib/rubocop/cop/lint/implicit_string_concatenation.rb
295
306
  - lib/rubocop/cop/lint/ineffective_access_modifier.rb
296
307
  - lib/rubocop/cop/lint/inherit_exception.rb
308
+ - lib/rubocop/cop/lint/interpolation_check.rb
297
309
  - lib/rubocop/cop/lint/invalid_character_literal.rb
298
310
  - lib/rubocop/cop/lint/literal_in_condition.rb
299
311
  - lib/rubocop/cop/lint/literal_in_interpolation.rb
@@ -306,9 +318,12 @@ files:
306
318
  - lib/rubocop/cop/lint/percent_string_array.rb
307
319
  - lib/rubocop/cop/lint/percent_symbol_array.rb
308
320
  - lib/rubocop/cop/lint/rand_one.rb
321
+ - lib/rubocop/cop/lint/redundant_with_index.rb
309
322
  - lib/rubocop/cop/lint/require_parentheses.rb
310
323
  - lib/rubocop/cop/lint/rescue_exception.rb
311
324
  - lib/rubocop/cop/lint/rescue_type.rb
325
+ - lib/rubocop/cop/lint/rescue_without_error_class.rb
326
+ - lib/rubocop/cop/lint/return_in_void_context.rb
312
327
  - lib/rubocop/cop/lint/safe_navigation_chain.rb
313
328
  - lib/rubocop/cop/lint/script_permission.rb
314
329
  - lib/rubocop/cop/lint/shadowed_exception.rb
@@ -322,6 +337,8 @@ files:
322
337
  - lib/rubocop/cop/lint/unreachable_code.rb
323
338
  - lib/rubocop/cop/lint/unused_block_argument.rb
324
339
  - lib/rubocop/cop/lint/unused_method_argument.rb
340
+ - lib/rubocop/cop/lint/uri_escape_unescape.rb
341
+ - lib/rubocop/cop/lint/uri_regexp.rb
325
342
  - lib/rubocop/cop/lint/useless_access_modifier.rb
326
343
  - lib/rubocop/cop/lint/useless_assignment.rb
327
344
  - lib/rubocop/cop/lint/useless_comparison.rb
@@ -339,7 +356,6 @@ files:
339
356
  - lib/rubocop/cop/metrics/module_length.rb
340
357
  - lib/rubocop/cop/metrics/parameter_lists.rb
341
358
  - lib/rubocop/cop/metrics/perceived_complexity.rb
342
- - lib/rubocop/cop/mixin/access_modifier_node.rb
343
359
  - lib/rubocop/cop/mixin/annotation_comment.rb
344
360
  - lib/rubocop/cop/mixin/array_hash_indentation.rb
345
361
  - lib/rubocop/cop/mixin/array_min_size.rb
@@ -362,6 +378,7 @@ files:
362
378
  - lib/rubocop/cop/mixin/first_element_line_break.rb
363
379
  - lib/rubocop/cop/mixin/frozen_string_literal.rb
364
380
  - lib/rubocop/cop/mixin/hash_alignment.rb
381
+ - lib/rubocop/cop/mixin/heredoc.rb
365
382
  - lib/rubocop/cop/mixin/ignored_pattern.rb
366
383
  - lib/rubocop/cop/mixin/integer_node.rb
367
384
  - lib/rubocop/cop/mixin/match_range.rb
@@ -371,10 +388,10 @@ files:
371
388
  - lib/rubocop/cop/mixin/multiline_expression_indentation.rb
372
389
  - lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb
373
390
  - lib/rubocop/cop/mixin/negative_conditional.rb
374
- - lib/rubocop/cop/mixin/on_method_def.rb
375
391
  - lib/rubocop/cop/mixin/on_normal_if_unless.rb
376
392
  - lib/rubocop/cop/mixin/parentheses.rb
377
393
  - lib/rubocop/cop/mixin/parser_diagnostic.rb
394
+ - lib/rubocop/cop/mixin/percent_array.rb
378
395
  - lib/rubocop/cop/mixin/percent_literal.rb
379
396
  - lib/rubocop/cop/mixin/preceding_following_alignment.rb
380
397
  - lib/rubocop/cop/mixin/rescue_node.rb
@@ -392,6 +409,18 @@ files:
392
409
  - lib/rubocop/cop/mixin/too_many_lines.rb
393
410
  - lib/rubocop/cop/mixin/trailing_comma.rb
394
411
  - lib/rubocop/cop/mixin/unused_argument.rb
412
+ - lib/rubocop/cop/naming/accessor_method_name.rb
413
+ - lib/rubocop/cop/naming/ascii_identifiers.rb
414
+ - lib/rubocop/cop/naming/binary_operator_parameter_name.rb
415
+ - lib/rubocop/cop/naming/class_and_module_camel_case.rb
416
+ - lib/rubocop/cop/naming/constant_name.rb
417
+ - lib/rubocop/cop/naming/file_name.rb
418
+ - lib/rubocop/cop/naming/heredoc_delimiter_case.rb
419
+ - lib/rubocop/cop/naming/heredoc_delimiter_naming.rb
420
+ - lib/rubocop/cop/naming/method_name.rb
421
+ - lib/rubocop/cop/naming/predicate_name.rb
422
+ - lib/rubocop/cop/naming/variable_name.rb
423
+ - lib/rubocop/cop/naming/variable_number.rb
395
424
  - lib/rubocop/cop/offense.rb
396
425
  - lib/rubocop/cop/performance/caller.rb
397
426
  - lib/rubocop/cop/performance/case_when_splat.rb
@@ -417,6 +446,8 @@ files:
417
446
  - lib/rubocop/cop/performance/start_with.rb
418
447
  - lib/rubocop/cop/performance/string_replacement.rb
419
448
  - lib/rubocop/cop/performance/times_map.rb
449
+ - lib/rubocop/cop/performance/unfreeze_string.rb
450
+ - lib/rubocop/cop/performance/uri_default_parser.rb
420
451
  - lib/rubocop/cop/rails/action_filter.rb
421
452
  - lib/rubocop/cop/rails/active_support_aliases.rb
422
453
  - lib/rubocop/cop/rails/application_job.rb
@@ -432,6 +463,7 @@ files:
432
463
  - lib/rubocop/cop/rails/find_by.rb
433
464
  - lib/rubocop/cop/rails/find_each.rb
434
465
  - lib/rubocop/cop/rails/has_and_belongs_to_many.rb
466
+ - lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb
435
467
  - lib/rubocop/cop/rails/http_positional_arguments.rb
436
468
  - lib/rubocop/cop/rails/not_null_column.rb
437
469
  - lib/rubocop/cop/rails/output.rb
@@ -455,12 +487,10 @@ files:
455
487
  - lib/rubocop/cop/security/marshal_load.rb
456
488
  - lib/rubocop/cop/security/yaml_load.rb
457
489
  - lib/rubocop/cop/severity.rb
458
- - lib/rubocop/cop/style/accessor_method_name.rb
459
490
  - lib/rubocop/cop/style/alias.rb
460
491
  - lib/rubocop/cop/style/and_or.rb
461
492
  - lib/rubocop/cop/style/array_join.rb
462
493
  - lib/rubocop/cop/style/ascii_comments.rb
463
- - lib/rubocop/cop/style/ascii_identifiers.rb
464
494
  - lib/rubocop/cop/style/attr.rb
465
495
  - lib/rubocop/cop/style/auto_resource_cleanup.rb
466
496
  - lib/rubocop/cop/style/bare_percent_literals.rb
@@ -470,7 +500,6 @@ files:
470
500
  - lib/rubocop/cop/style/braces_around_hash_parameters.rb
471
501
  - lib/rubocop/cop/style/case_equality.rb
472
502
  - lib/rubocop/cop/style/character_literal.rb
473
- - lib/rubocop/cop/style/class_and_module_camel_case.rb
474
503
  - lib/rubocop/cop/style/class_and_module_children.rb
475
504
  - lib/rubocop/cop/style/class_check.rb
476
505
  - lib/rubocop/cop/style/class_methods.rb
@@ -480,9 +509,9 @@ files:
480
509
  - lib/rubocop/cop/style/command_literal.rb
481
510
  - lib/rubocop/cop/style/comment_annotation.rb
482
511
  - lib/rubocop/cop/style/conditional_assignment.rb
483
- - lib/rubocop/cop/style/constant_name.rb
484
512
  - lib/rubocop/cop/style/copyright.rb
485
513
  - lib/rubocop/cop/style/def_with_parentheses.rb
514
+ - lib/rubocop/cop/style/dir.rb
486
515
  - lib/rubocop/cop/style/documentation.rb
487
516
  - lib/rubocop/cop/style/documentation_method.rb
488
517
  - lib/rubocop/cop/style/double_negation.rb
@@ -495,7 +524,6 @@ files:
495
524
  - lib/rubocop/cop/style/encoding.rb
496
525
  - lib/rubocop/cop/style/end_block.rb
497
526
  - lib/rubocop/cop/style/even_odd.rb
498
- - lib/rubocop/cop/style/file_name.rb
499
527
  - lib/rubocop/cop/style/flip_flop.rb
500
528
  - lib/rubocop/cop/style/for.rb
501
529
  - lib/rubocop/cop/style/format_string.rb
@@ -521,7 +549,7 @@ files:
521
549
  - lib/rubocop/cop/style/method_called_on_do_end_block.rb
522
550
  - lib/rubocop/cop/style/method_def_parentheses.rb
523
551
  - lib/rubocop/cop/style/method_missing.rb
524
- - lib/rubocop/cop/style/method_name.rb
552
+ - lib/rubocop/cop/style/min_max.rb
525
553
  - lib/rubocop/cop/style/missing_else.rb
526
554
  - lib/rubocop/cop/style/mixin_grouping.rb
527
555
  - lib/rubocop/cop/style/module_function.rb
@@ -545,19 +573,19 @@ files:
545
573
  - lib/rubocop/cop/style/numeric_literals.rb
546
574
  - lib/rubocop/cop/style/numeric_predicate.rb
547
575
  - lib/rubocop/cop/style/one_line_conditional.rb
548
- - lib/rubocop/cop/style/op_method.rb
549
576
  - lib/rubocop/cop/style/option_hash.rb
550
577
  - lib/rubocop/cop/style/optional_arguments.rb
578
+ - lib/rubocop/cop/style/or_assignment.rb
551
579
  - lib/rubocop/cop/style/parallel_assignment.rb
552
580
  - lib/rubocop/cop/style/parentheses_around_condition.rb
553
581
  - lib/rubocop/cop/style/percent_literal_delimiters.rb
554
582
  - lib/rubocop/cop/style/percent_q_literals.rb
555
583
  - lib/rubocop/cop/style/perl_backrefs.rb
556
- - lib/rubocop/cop/style/predicate_name.rb
557
584
  - lib/rubocop/cop/style/preferred_hash_methods.rb
558
585
  - lib/rubocop/cop/style/proc.rb
559
586
  - lib/rubocop/cop/style/raise_args.rb
560
587
  - lib/rubocop/cop/style/redundant_begin.rb
588
+ - lib/rubocop/cop/style/redundant_conditional.rb
561
589
  - lib/rubocop/cop/style/redundant_exception.rb
562
590
  - lib/rubocop/cop/style/redundant_freeze.rb
563
591
  - lib/rubocop/cop/style/redundant_parentheses.rb
@@ -565,6 +593,7 @@ files:
565
593
  - lib/rubocop/cop/style/redundant_self.rb
566
594
  - lib/rubocop/cop/style/regexp_literal.rb
567
595
  - lib/rubocop/cop/style/rescue_modifier.rb
596
+ - lib/rubocop/cop/style/return_nil.rb
568
597
  - lib/rubocop/cop/style/safe_navigation.rb
569
598
  - lib/rubocop/cop/style/self_assignment.rb
570
599
  - lib/rubocop/cop/style/semicolon.rb
@@ -591,8 +620,6 @@ files:
591
620
  - lib/rubocop/cop/style/unneeded_interpolation.rb
592
621
  - lib/rubocop/cop/style/unneeded_percent_q.rb
593
622
  - lib/rubocop/cop/style/variable_interpolation.rb
594
- - lib/rubocop/cop/style/variable_name.rb
595
- - lib/rubocop/cop/style/variable_number.rb
596
623
  - lib/rubocop/cop/style/when_then.rb
597
624
  - lib/rubocop/cop/style/while_until_do.rb
598
625
  - lib/rubocop/cop/style/while_until_modifier.rb
@@ -624,6 +651,7 @@ files:
624
651
  - lib/rubocop/formatter/offense_count_formatter.rb
625
652
  - lib/rubocop/formatter/progress_formatter.rb
626
653
  - lib/rubocop/formatter/simple_text_formatter.rb
654
+ - lib/rubocop/formatter/tap_formatter.rb
627
655
  - lib/rubocop/formatter/text_util.rb
628
656
  - lib/rubocop/formatter/worst_offenders_formatter.rb
629
657
  - lib/rubocop/magic_comment.rb
@@ -649,10 +677,15 @@ files:
649
677
  - lib/rubocop/token.rb
650
678
  - lib/rubocop/version.rb
651
679
  - lib/rubocop/warning.rb
652
- homepage: http://github.com/bbatsov/rubocop
680
+ homepage: https://github.com/bbatsov/rubocop
653
681
  licenses:
654
682
  - MIT
655
- metadata: {}
683
+ metadata:
684
+ homepage_uri: https://rubocop.readthedocs.io/
685
+ changelog_uri: https://github.com/bbatsov/rubocop/blob/master/CHANGELOG.md
686
+ source_code_uri: https://github.com/bbatsov/rubocop/
687
+ documentation_uri: https://rubocop.readthedocs.io/
688
+ bug_tracker_uri: https://github.com/bbatsov/rubocop/issues
656
689
  post_install_message:
657
690
  rdoc_options: []
658
691
  require_paths: