rubocop 0.52.1 → 0.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (292) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +1 -1
  3. data/README.md +2 -2
  4. data/config/default.yml +118 -46
  5. data/config/disabled.yml +8 -8
  6. data/config/enabled.yml +84 -28
  7. data/lib/rubocop.rb +28 -8
  8. data/lib/rubocop/ast/builder.rb +35 -37
  9. data/lib/rubocop/ast/node.rb +16 -1
  10. data/lib/rubocop/ast/node/and_node.rb +0 -8
  11. data/lib/rubocop/ast/node/block_node.rb +1 -9
  12. data/lib/rubocop/ast/node/case_node.rb +0 -8
  13. data/lib/rubocop/ast/node/ensure_node.rb +0 -8
  14. data/lib/rubocop/ast/node/for_node.rb +0 -8
  15. data/lib/rubocop/ast/node/or_node.rb +0 -8
  16. data/lib/rubocop/ast/node/pair_node.rb +0 -8
  17. data/lib/rubocop/ast/node/resbody_node.rb +0 -8
  18. data/lib/rubocop/ast/node/send_node.rb +0 -8
  19. data/lib/rubocop/ast/node/symbol_node.rb +0 -8
  20. data/lib/rubocop/ast/node/until_node.rb +0 -8
  21. data/lib/rubocop/ast/node/when_node.rb +0 -8
  22. data/lib/rubocop/ast/node/while_node.rb +0 -8
  23. data/lib/rubocop/cli.rb +17 -7
  24. data/lib/rubocop/comment_config.rb +24 -3
  25. data/lib/rubocop/config.rb +75 -6
  26. data/lib/rubocop/config_loader.rb +18 -28
  27. data/lib/rubocop/config_loader_resolver.rb +61 -9
  28. data/lib/rubocop/cop/bundler/duplicated_gem.rb +3 -1
  29. data/lib/rubocop/cop/bundler/insecure_protocol_source.rb +4 -2
  30. data/lib/rubocop/cop/bundler/ordered_gems.rb +1 -1
  31. data/lib/rubocop/cop/commissioner.rb +2 -2
  32. data/lib/rubocop/cop/cop.rb +4 -0
  33. data/lib/rubocop/cop/corrector.rb +11 -1
  34. data/lib/rubocop/cop/correctors/alignment_corrector.rb +3 -6
  35. data/lib/rubocop/cop/correctors/line_break_corrector.rb +59 -0
  36. data/lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb +1 -1
  37. data/lib/rubocop/cop/correctors/space_corrector.rb +13 -0
  38. data/lib/rubocop/cop/correctors/unused_arg_corrector.rb +1 -1
  39. data/lib/rubocop/cop/gemspec/duplicated_assignment.rb +3 -1
  40. data/lib/rubocop/cop/gemspec/ordered_dependencies.rb +1 -1
  41. data/lib/rubocop/cop/gemspec/required_ruby_version.rb +3 -5
  42. data/lib/rubocop/cop/generator.rb +29 -8
  43. data/lib/rubocop/cop/internal_affairs/redundant_location_argument.rb +2 -0
  44. data/lib/rubocop/cop/internal_affairs/redundant_message_argument.rb +2 -0
  45. data/lib/rubocop/cop/layout/align_hash.rb +106 -37
  46. data/lib/rubocop/cop/{lint → layout}/block_alignment.rb +8 -5
  47. data/lib/rubocop/cop/layout/block_end_newline.rb +7 -17
  48. data/lib/rubocop/cop/layout/case_indentation.rb +1 -0
  49. data/lib/rubocop/cop/layout/class_structure.rb +6 -7
  50. data/lib/rubocop/cop/layout/comment_indentation.rb +1 -1
  51. data/lib/rubocop/cop/{lint → layout}/condition_position.rb +3 -3
  52. data/lib/rubocop/cop/{lint → layout}/def_end_alignment.rb +2 -1
  53. data/lib/rubocop/cop/layout/else_alignment.rb +1 -1
  54. data/lib/rubocop/cop/layout/empty_comment.rb +140 -0
  55. data/lib/rubocop/cop/layout/empty_line_after_magic_comment.rb +2 -0
  56. data/lib/rubocop/cop/layout/empty_line_between_defs.rb +2 -0
  57. data/lib/rubocop/cop/layout/empty_lines.rb +3 -1
  58. data/lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb +7 -5
  59. data/lib/rubocop/cop/layout/empty_lines_around_arguments.rb +20 -10
  60. data/lib/rubocop/cop/layout/empty_lines_around_class_body.rb +20 -0
  61. data/lib/rubocop/cop/{lint → layout}/end_alignment.rb +37 -6
  62. data/lib/rubocop/cop/layout/end_of_line.rb +1 -0
  63. data/lib/rubocop/cop/layout/extra_spacing.rb +30 -37
  64. data/lib/rubocop/cop/layout/first_parameter_indentation.rb +1 -0
  65. data/lib/rubocop/cop/layout/indent_heredoc.rb +38 -2
  66. data/lib/rubocop/cop/layout/indentation_consistency.rb +105 -1
  67. data/lib/rubocop/cop/layout/indentation_width.rb +4 -3
  68. data/lib/rubocop/cop/layout/initial_indentation.rb +15 -1
  69. data/lib/rubocop/cop/layout/leading_comment_space.rb +4 -2
  70. data/lib/rubocop/cop/layout/multiline_assignment_layout.rb +1 -0
  71. data/lib/rubocop/cop/layout/multiline_block_layout.rb +2 -0
  72. data/lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb +62 -29
  73. data/lib/rubocop/cop/layout/multiline_method_call_indentation.rb +1 -1
  74. data/lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb +74 -33
  75. data/lib/rubocop/cop/layout/multiline_operation_indentation.rb +16 -2
  76. data/lib/rubocop/cop/layout/rescue_ensure_alignment.rb +3 -1
  77. data/lib/rubocop/cop/layout/space_after_method_name.rb +2 -0
  78. data/lib/rubocop/cop/layout/space_after_not.rb +2 -0
  79. data/lib/rubocop/cop/layout/space_around_block_parameters.rb +1 -0
  80. data/lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb +15 -2
  81. data/lib/rubocop/cop/layout/space_around_operators.rb +15 -13
  82. data/lib/rubocop/cop/layout/space_before_block_braces.rb +13 -1
  83. data/lib/rubocop/cop/layout/space_before_comment.rb +6 -4
  84. data/lib/rubocop/cop/layout/space_before_first_arg.rb +1 -0
  85. data/lib/rubocop/cop/layout/space_in_lambda_literal.rb +1 -0
  86. data/lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb +30 -45
  87. data/lib/rubocop/cop/layout/space_inside_block_braces.rb +3 -2
  88. data/lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb +48 -18
  89. data/lib/rubocop/cop/layout/space_inside_parens.rb +8 -7
  90. data/lib/rubocop/cop/layout/space_inside_reference_brackets.rb +57 -11
  91. data/lib/rubocop/cop/layout/space_inside_string_interpolation.rb +1 -0
  92. data/lib/rubocop/cop/layout/tab.rb +42 -16
  93. data/lib/rubocop/cop/layout/trailing_blank_lines.rb +46 -13
  94. data/lib/rubocop/cop/layout/trailing_whitespace.rb +12 -0
  95. data/lib/rubocop/cop/lint/ambiguous_block_association.rb +5 -3
  96. data/lib/rubocop/cop/lint/big_decimal_new.rb +44 -0
  97. data/lib/rubocop/cop/lint/boolean_symbol.rb +2 -2
  98. data/lib/rubocop/cop/lint/circular_argument_reference.rb +2 -2
  99. data/lib/rubocop/cop/lint/debugger.rb +2 -2
  100. data/lib/rubocop/cop/lint/deprecated_class_methods.rb +5 -4
  101. data/lib/rubocop/cop/lint/duplicate_methods.rb +20 -9
  102. data/lib/rubocop/cop/lint/format_parameter_mismatch.rb +4 -3
  103. data/lib/rubocop/cop/lint/implicit_string_concatenation.rb +16 -10
  104. data/lib/rubocop/cop/lint/ineffective_access_modifier.rb +5 -4
  105. data/lib/rubocop/cop/lint/inherit_exception.rb +2 -2
  106. data/lib/rubocop/cop/lint/interpolation_check.rb +4 -3
  107. data/lib/rubocop/cop/lint/literal_as_condition.rb +2 -2
  108. data/lib/rubocop/cop/lint/literal_in_interpolation.rb +2 -0
  109. data/lib/rubocop/cop/lint/missing_cop_enable_directive.rb +7 -5
  110. data/lib/rubocop/cop/lint/nested_percent_literal.rb +1 -1
  111. data/lib/rubocop/cop/lint/number_conversion.rb +59 -0
  112. data/lib/rubocop/cop/lint/ordered_magic_comments.rb +86 -0
  113. data/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb +2 -0
  114. data/lib/rubocop/cop/lint/percent_string_array.rb +0 -2
  115. data/lib/rubocop/cop/lint/rand_one.rb +2 -2
  116. data/lib/rubocop/cop/lint/redundant_with_index.rb +2 -0
  117. data/lib/rubocop/cop/lint/redundant_with_object.rb +2 -0
  118. data/lib/rubocop/cop/lint/require_parentheses.rb +2 -0
  119. data/lib/rubocop/cop/lint/rescue_type.rb +6 -3
  120. data/lib/rubocop/cop/lint/return_in_void_context.rb +2 -2
  121. data/lib/rubocop/cop/lint/safe_navigation_chain.rb +17 -21
  122. data/lib/rubocop/cop/lint/script_permission.rb +30 -10
  123. data/lib/rubocop/cop/lint/shadowed_argument.rb +3 -3
  124. data/lib/rubocop/cop/lint/shadowed_exception.rb +1 -0
  125. data/lib/rubocop/cop/lint/shadowing_outer_local_variable.rb +2 -2
  126. data/lib/rubocop/cop/lint/unified_integer.rb +2 -2
  127. data/lib/rubocop/cop/lint/{unneeded_disable.rb → unneeded_cop_disable_directive.rb} +13 -7
  128. data/lib/rubocop/cop/lint/unneeded_cop_enable_directive.rb +97 -0
  129. data/lib/rubocop/cop/lint/unneeded_require_statement.rb +1 -0
  130. data/lib/rubocop/cop/lint/unreachable_code.rb +3 -3
  131. data/lib/rubocop/cop/lint/uri_escape_unescape.rb +11 -10
  132. data/lib/rubocop/cop/lint/useless_access_modifier.rb +7 -5
  133. data/lib/rubocop/cop/lint/useless_assignment.rb +2 -2
  134. data/lib/rubocop/cop/lint/useless_setter_call.rb +2 -2
  135. data/lib/rubocop/cop/lint/void.rb +49 -10
  136. data/lib/rubocop/cop/metrics/block_nesting.rb +1 -1
  137. data/lib/rubocop/cop/metrics/line_length.rb +5 -2
  138. data/lib/rubocop/cop/mixin/alignment.rb +4 -0
  139. data/lib/rubocop/cop/mixin/configurable_enforced_style.rb +1 -1
  140. data/lib/rubocop/cop/mixin/def_node.rb +4 -0
  141. data/lib/rubocop/cop/mixin/documentation_comment.rb +11 -3
  142. data/lib/rubocop/cop/mixin/empty_lines_around_body.rb +12 -2
  143. data/lib/rubocop/cop/mixin/end_keyword_alignment.rb +20 -1
  144. data/lib/rubocop/cop/mixin/frozen_string_literal.rb +4 -0
  145. data/lib/rubocop/cop/mixin/hash_alignment.rb +2 -2
  146. data/lib/rubocop/cop/mixin/match_range.rb +2 -0
  147. data/lib/rubocop/cop/mixin/multiline_expression_indentation.rb +6 -0
  148. data/lib/rubocop/cop/mixin/nil_methods.rb +19 -0
  149. data/lib/rubocop/cop/mixin/percent_literal.rb +57 -9
  150. data/lib/rubocop/cop/mixin/preceding_following_alignment.rb +6 -5
  151. data/lib/rubocop/cop/mixin/range_help.rb +102 -0
  152. data/lib/rubocop/cop/mixin/rescue_node.rb +1 -1
  153. data/lib/rubocop/cop/mixin/space_after_punctuation.rb +8 -7
  154. data/lib/rubocop/cop/mixin/space_before_punctuation.rb +11 -9
  155. data/lib/rubocop/cop/mixin/statement_modifier.rb +3 -10
  156. data/lib/rubocop/cop/mixin/surrounding_space.rb +38 -8
  157. data/lib/rubocop/cop/mixin/trailing_body.rb +26 -0
  158. data/lib/rubocop/cop/mixin/trailing_comma.rb +15 -3
  159. data/lib/rubocop/cop/mixin/uncommunicative_name.rb +104 -0
  160. data/lib/rubocop/cop/naming/ascii_identifiers.rb +3 -1
  161. data/lib/rubocop/cop/naming/file_name.rb +5 -10
  162. data/lib/rubocop/cop/naming/memoized_instance_variable_name.rb +76 -0
  163. data/lib/rubocop/cop/naming/uncommunicative_block_param_name.rb +48 -0
  164. data/lib/rubocop/cop/naming/uncommunicative_method_param_name.rb +57 -0
  165. data/lib/rubocop/cop/offense.rb +3 -2
  166. data/lib/rubocop/cop/performance/case_when_splat.rb +1 -0
  167. data/lib/rubocop/cop/performance/casecmp.rb +17 -8
  168. data/lib/rubocop/cop/performance/compare_with_block.rb +2 -0
  169. data/lib/rubocop/cop/performance/count.rb +1 -0
  170. data/lib/rubocop/cop/performance/fixed_size.rb +41 -0
  171. data/lib/rubocop/cop/performance/flat_map.rb +2 -0
  172. data/lib/rubocop/cop/performance/lstrip_rstrip.rb +2 -0
  173. data/lib/rubocop/cop/performance/redundant_merge.rb +1 -1
  174. data/lib/rubocop/cop/performance/redundant_sort_by.rb +2 -0
  175. data/lib/rubocop/cop/performance/regexp_match.rb +4 -0
  176. data/lib/rubocop/cop/performance/reverse_each.rb +2 -0
  177. data/lib/rubocop/cop/performance/string_replacement.rb +2 -0
  178. data/lib/rubocop/cop/rails/active_record_aliases.rb +46 -0
  179. data/lib/rubocop/cop/rails/blank.rb +3 -3
  180. data/lib/rubocop/cop/rails/create_table_with_timestamps.rb +6 -0
  181. data/lib/rubocop/cop/rails/delegate.rb +6 -6
  182. data/lib/rubocop/cop/rails/file_path.rb +7 -1
  183. data/lib/rubocop/cop/rails/find_by.rb +2 -0
  184. data/lib/rubocop/cop/rails/http_positional_arguments.rb +17 -5
  185. data/lib/rubocop/cop/rails/inverse_of.rb +21 -2
  186. data/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb +45 -9
  187. data/lib/rubocop/cop/rails/presence.rb +8 -2
  188. data/lib/rubocop/cop/rails/present.rb +5 -5
  189. data/lib/rubocop/cop/rails/read_write_attribute.rb +4 -3
  190. data/lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb +1 -0
  191. data/lib/rubocop/cop/rails/relative_date_constant.rb +4 -3
  192. data/lib/rubocop/cop/rails/request_referer.rb +3 -2
  193. data/lib/rubocop/cop/rails/reversible_migration.rb +9 -8
  194. data/lib/rubocop/cop/rails/safe_navigation.rb +3 -2
  195. data/lib/rubocop/cop/rails/save_bang.rb +11 -12
  196. data/lib/rubocop/cop/rails/skips_model_validations.rb +2 -2
  197. data/lib/rubocop/cop/rails/time_zone.rb +38 -16
  198. data/lib/rubocop/cop/rails/uniq_before_pluck.rb +26 -16
  199. data/lib/rubocop/cop/rails/validation.rb +30 -2
  200. data/lib/rubocop/cop/security/open.rb +48 -0
  201. data/lib/rubocop/cop/style/and_or.rb +1 -0
  202. data/lib/rubocop/cop/style/ascii_comments.rb +3 -1
  203. data/lib/rubocop/cop/style/attr.rb +2 -0
  204. data/lib/rubocop/cop/style/block_comments.rb +3 -1
  205. data/lib/rubocop/cop/style/braces_around_hash_parameters.rb +2 -5
  206. data/lib/rubocop/cop/style/class_and_module_children.rb +1 -0
  207. data/lib/rubocop/cop/style/class_vars.rb +23 -0
  208. data/lib/rubocop/cop/style/colon_method_call.rb +1 -2
  209. data/lib/rubocop/cop/style/comment_annotation.rb +6 -4
  210. data/lib/rubocop/cop/style/commented_keyword.rb +3 -1
  211. data/lib/rubocop/cop/style/conditional_assignment.rb +1 -1
  212. data/lib/rubocop/cop/style/copyright.rb +3 -1
  213. data/lib/rubocop/cop/style/each_with_object.rb +15 -1
  214. data/lib/rubocop/cop/style/empty_block_parameter.rb +1 -0
  215. data/lib/rubocop/cop/style/empty_case_condition.rb +2 -0
  216. data/lib/rubocop/cop/style/empty_else.rb +9 -5
  217. data/lib/rubocop/cop/style/empty_lambda_parameter.rb +1 -0
  218. data/lib/rubocop/cop/style/empty_line_after_guard_clause.rb +80 -0
  219. data/lib/rubocop/cop/style/empty_literal.rb +1 -0
  220. data/lib/rubocop/cop/style/encoding.rb +2 -0
  221. data/lib/rubocop/cop/style/expand_path_arguments.rb +194 -0
  222. data/lib/rubocop/cop/style/for.rb +33 -0
  223. data/lib/rubocop/cop/style/format_string.rb +1 -1
  224. data/lib/rubocop/cop/style/format_string_token.rb +4 -5
  225. data/lib/rubocop/cop/style/frozen_string_literal_comment.rb +2 -1
  226. data/lib/rubocop/cop/style/hash_syntax.rb +1 -0
  227. data/lib/rubocop/cop/style/if_unless_modifier.rb +1 -1
  228. data/lib/rubocop/cop/style/inline_comment.rb +1 -1
  229. data/lib/rubocop/cop/style/lambda.rb +1 -1
  230. data/lib/rubocop/cop/style/line_end_concatenation.rb +2 -0
  231. data/lib/rubocop/cop/style/method_called_on_do_end_block.rb +2 -0
  232. data/lib/rubocop/cop/style/method_def_parentheses.rb +1 -0
  233. data/lib/rubocop/cop/style/missing_else.rb +72 -7
  234. data/lib/rubocop/cop/style/mixin_usage.rb +3 -5
  235. data/lib/rubocop/cop/style/module_function.rb +10 -0
  236. data/lib/rubocop/cop/style/multiline_block_chain.rb +2 -0
  237. data/lib/rubocop/cop/style/multiline_if_then.rb +1 -0
  238. data/lib/rubocop/cop/style/nested_modifier.rb +2 -0
  239. data/lib/rubocop/cop/style/nested_parenthesized_calls.rb +2 -0
  240. data/lib/rubocop/cop/style/next.rb +1 -0
  241. data/lib/rubocop/cop/style/not.rb +2 -0
  242. data/lib/rubocop/cop/style/numeric_literals.rb +1 -1
  243. data/lib/rubocop/cop/style/one_line_conditional.rb +2 -2
  244. data/lib/rubocop/cop/style/redundant_exception.rb +8 -3
  245. data/lib/rubocop/cop/style/redundant_return.rb +37 -3
  246. data/lib/rubocop/cop/style/redundant_self.rb +1 -1
  247. data/lib/rubocop/cop/style/rescue_standard_error.rb +1 -0
  248. data/lib/rubocop/cop/style/safe_navigation.rb +74 -32
  249. data/lib/rubocop/cop/style/semicolon.rb +3 -1
  250. data/lib/rubocop/cop/style/single_line_methods.rb +14 -23
  251. data/lib/rubocop/cop/style/stderr_puts.rb +2 -0
  252. data/lib/rubocop/cop/style/string_hash_keys.rb +12 -0
  253. data/lib/rubocop/cop/style/string_literals.rb +1 -1
  254. data/lib/rubocop/cop/style/string_literals_in_interpolation.rb +1 -1
  255. data/lib/rubocop/cop/style/symbol_array.rb +29 -0
  256. data/lib/rubocop/cop/style/symbol_proc.rb +2 -0
  257. data/lib/rubocop/cop/style/trailing_body_on_class.rb +43 -0
  258. data/lib/rubocop/cop/style/trailing_body_on_method_definition.rb +7 -54
  259. data/lib/rubocop/cop/style/trailing_body_on_module.rb +43 -0
  260. data/lib/rubocop/cop/style/{trailing_comma_in_literal.rb → trailing_comma_in_array_literal.rb} +2 -20
  261. data/lib/rubocop/cop/style/trailing_comma_in_hash_literal.rb +56 -0
  262. data/lib/rubocop/cop/style/trailing_method_end_statement.rb +17 -20
  263. data/lib/rubocop/cop/style/trailing_underscore_variable.rb +1 -0
  264. data/lib/rubocop/cop/style/unless_else.rb +2 -0
  265. data/lib/rubocop/cop/style/word_array.rb +0 -1
  266. data/lib/rubocop/cop/style/yoda_condition.rb +1 -0
  267. data/lib/rubocop/cop/team.rb +5 -5
  268. data/lib/rubocop/cop/util.rb +23 -188
  269. data/lib/rubocop/cop/variable_force.rb +1 -1
  270. data/lib/rubocop/file_finder.rb +45 -0
  271. data/lib/rubocop/formatter/disabled_config_formatter.rb +23 -14
  272. data/lib/rubocop/formatter/fuubar_style_formatter.rb +1 -1
  273. data/lib/rubocop/formatter/html_formatter.rb +12 -5
  274. data/lib/rubocop/formatter/json_formatter.rb +1 -1
  275. data/lib/rubocop/node_pattern.rb +8 -5
  276. data/lib/rubocop/options.rb +40 -33
  277. data/lib/rubocop/path_util.rb +5 -8
  278. data/lib/rubocop/processed_source.rb +53 -0
  279. data/lib/rubocop/remote_config.rb +1 -1
  280. data/lib/rubocop/result_cache.rb +1 -1
  281. data/lib/rubocop/rspec/cop_helper.rb +0 -4
  282. data/lib/rubocop/rspec/host_environment_simulation_helper.rb +0 -4
  283. data/lib/rubocop/rspec/shared_contexts.rb +3 -1
  284. data/lib/rubocop/rspec/shared_examples.rb +23 -25
  285. data/lib/rubocop/rspec/support.rb +5 -0
  286. data/lib/rubocop/runner.rb +3 -2
  287. data/lib/rubocop/string_util.rb +10 -9
  288. data/lib/rubocop/target_finder.rb +4 -1
  289. data/lib/rubocop/token.rb +26 -16
  290. data/lib/rubocop/version.rb +6 -4
  291. metadata +31 -17
  292. data/lib/rubocop/cop/performance/hash_each_methods.rb +0 -129
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9c220d66052a5e9bbd4c5c4b8152f9eb198def00
4
- data.tar.gz: 3b3e355cef47c417d03265e565f7bf1fe94c7b9e
3
+ metadata.gz: d333d0b4cd8b310bb068ffc26f524a194930c15a
4
+ data.tar.gz: 4f8e00e088adff5221918b4b1d91b7ada3f4e346
5
5
  SHA512:
6
- metadata.gz: cba8acef3a405e92862d9ae1e1783bbeb6f9d4675fe978068a519a759598a26b2b79b10e0bc688fe0ee2c1b8a0c640316395c65f94903179b0b45a9b091f63b9
7
- data.tar.gz: 3e31e510ef57bd3ccd4b2085398c22b1da1a0a137efa487c4f110b5c1d0d8ad568197d899f05a3b79bd9d281c9933ee8c6d19f134b0d052344ca778e50c07739
6
+ metadata.gz: 34e929b669ad6134d57b4d57f4adb78aab3e3bf9d230678c2a95625b9d356fb29d45e44ee3992bd6cc767d790c182b99f8fbcbb6ae9c1f6f1a018601c840ac0a
7
+ data.tar.gz: ffe1738566882f2890c9532b4414e5733312e2d50fe7d112dcb30c91983a8ace89659f897e8fc497d27460886c98a84f4b7805aaea045a03903b9ccc3fd304da
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012-17 Bozhidar Batsov
1
+ Copyright (c) 2012-18 Bozhidar Batsov
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -52,7 +52,7 @@ haven't reached version 1.0 yet). To prevent an unwanted RuboCop update you
52
52
  might want to use a conservative version locking in your `Gemfile`:
53
53
 
54
54
  ```rb
55
- gem 'rubocop', '~> 0.52.1', require: false
55
+ gem 'rubocop', '~> 0.53.0', require: false
56
56
  ```
57
57
 
58
58
  ## Quickstart
@@ -210,5 +210,5 @@ RuboCop's changelog is available [here](CHANGELOG.md).
210
210
 
211
211
  ## Copyright
212
212
 
213
- Copyright (c) 2012-2017 Bozhidar Batsov. See [LICENSE.txt](LICENSE.txt) for
213
+ Copyright (c) 2012-2018 Bozhidar Batsov. See [LICENSE.txt](LICENSE.txt) for
214
214
  further details.
@@ -9,8 +9,11 @@ inherit_from:
9
9
  AllCops:
10
10
  # Include common Ruby source files.
11
11
  Include:
12
+ - '**/*.arb'
13
+ - '**/*.axlsx'
12
14
  - '**/*.builder'
13
15
  - '**/*.fcgi'
16
+ - '**/*.gemfile'
14
17
  - '**/*.gemspec'
15
18
  - '**/*.god'
16
19
  - '**/*.jb'
@@ -57,6 +60,7 @@ AllCops:
57
60
  Exclude:
58
61
  - 'node_modules/**/*'
59
62
  - 'vendor/**/*'
63
+ - '.git/**/*'
60
64
  # Default formatter will be used if no `-f/--format` option is given.
61
65
  DefaultFormatter: progress
62
66
  # Cop names are displayed in offense messages by default. Change behavior
@@ -115,7 +119,14 @@ AllCops:
115
119
  # Else if .ruby-version exists and it contains an MRI version it is used.
116
120
  # Otherwise we fallback to the oldest officially supported Ruby version (2.1).
117
121
  TargetRubyVersion: ~
118
- TargetRailsVersion: 5.0
122
+ # What version of Rails is the inspected code using? If a value is specified
123
+ # for TargetRailsVersion then it is used. Acceptable values are specificed
124
+ # as a float (i.e. 5.1); the patch version of Rails should not be included.
125
+ # If TargetRailsVersion is not set, RuboCop will parse the Gemfile.lock or
126
+ # gems.locked file to find the version of Rails that has been bound to the
127
+ # application. If neither of those files exist, RuboCop will use Rails 5.0
128
+ # as the default.
129
+ TargetRailsVersion: ~
119
130
 
120
131
  #################### Layout ###########################
121
132
 
@@ -223,6 +234,19 @@ Layout/AlignParameters:
223
234
  # But it can be overridden by setting this parameter
224
235
  IndentationWidth: ~
225
236
 
237
+ # checks whether the end keywords are aligned properly for `do` `end` blocks.
238
+ Layout/BlockAlignment:
239
+ # The value `start_of_block` means that the `end` should be aligned with line
240
+ # where the `do` keyword appears.
241
+ # The value `start_of_line` means it should be aligned with the whole
242
+ # expression's starting line.
243
+ # The value `either` means both are allowed.
244
+ EnforcedStyleAlignWith: either
245
+ SupportedStylesAlignWith:
246
+ - either
247
+ - start_of_block
248
+ - start_of_line
249
+
226
250
  # Indentation of `when`.
227
251
  Layout/CaseIndentation:
228
252
  EnforcedStyle: case
@@ -235,6 +259,18 @@ Layout/CaseIndentation:
235
259
  # This only matters if `IndentOneStep` is `true`
236
260
  IndentationWidth: ~
237
261
 
262
+ Layout/DefEndAlignment:
263
+ # The value `def` means that `end` should be aligned with the def keyword.
264
+ # The value `start_of_line` means that `end` should be aligned with method
265
+ # calls like `private`, `public`, etc, if present in front of the `def`
266
+ # keyword on the same line.
267
+ EnforcedStyleAlignWith: start_of_line
268
+ SupportedStylesAlignWith:
269
+ - start_of_line
270
+ - def
271
+ AutoCorrect: false
272
+ Severity: warning
273
+
238
274
  # Multi-line method chaining should be done with leading dots.
239
275
  Layout/DotPosition:
240
276
  EnforcedStyle: leading
@@ -242,6 +278,10 @@ Layout/DotPosition:
242
278
  - leading
243
279
  - trailing
244
280
 
281
+ Layout/EmptyComment:
282
+ AllowBorderComment: true
283
+ AllowMarginComment: true
284
+
245
285
  # Use empty lines between defs.
246
286
  Layout/EmptyLineBetweenDefs:
247
287
  # If `true`, this parameter means that single line method definitions don't
@@ -263,6 +303,8 @@ Layout/EmptyLinesAroundClassBody:
263
303
  - empty_lines_except_namespace
264
304
  - empty_lines_special
265
305
  - no_empty_lines
306
+ - beginning_only
307
+ - ending_only
266
308
 
267
309
  Layout/EmptyLinesAroundModuleBody:
268
310
  EnforcedStyle: no_empty_lines
@@ -272,6 +314,23 @@ Layout/EmptyLinesAroundModuleBody:
272
314
  - empty_lines_special
273
315
  - no_empty_lines
274
316
 
317
+ # Align ends correctly.
318
+ Layout/EndAlignment:
319
+ # The value `keyword` means that `end` should be aligned with the matching
320
+ # keyword (`if`, `while`, etc.).
321
+ # The value `variable` means that in assignments, `end` should be aligned
322
+ # with the start of the variable on the left hand side of `=`. In all other
323
+ # situations, `end` should still be aligned with the keyword.
324
+ # The value `start_of_line` means that `end` should be aligned with the start
325
+ # of the line which the matching keyword appears on.
326
+ EnforcedStyleAlignWith: keyword
327
+ SupportedStylesAlignWith:
328
+ - keyword
329
+ - variable
330
+ - start_of_line
331
+ AutoCorrect: false
332
+ Severity: warning
333
+
275
334
  Layout/EndOfLine:
276
335
  # The `native` style means that CR+LF (Carriage Return + Line Feed) is
277
336
  # enforced on Windows, and LF is enforced on other platforms. The other styles
@@ -544,6 +603,10 @@ Layout/SpaceInsideReferenceBrackets:
544
603
  SupportedStyles:
545
604
  - space
546
605
  - no_space
606
+ EnforcedStyleForEmptyBrackets: no_space
607
+ SupportedStylesForEmptyBrackets:
608
+ - space
609
+ - no_space
547
610
 
548
611
  Layout/SpaceInsideStringInterpolation:
549
612
  EnforcedStyle: no_space
@@ -682,6 +745,26 @@ Naming/PredicateName:
682
745
  Exclude:
683
746
  - 'spec/**/*'
684
747
 
748
+ Naming/UncommunicativeBlockParamName:
749
+ # Parameter names may be equal to or greater than this value
750
+ MinNameLength: 1
751
+ AllowNamesEndingInNumbers: true
752
+ # Whitelisted names that will not register an offense
753
+ AllowedNames: []
754
+ # Blacklisted names that will register an offense
755
+ ForbiddenNames: []
756
+
757
+ Naming/UncommunicativeMethodParamName:
758
+ # Parameter names may be equal to or greater than this value
759
+ MinNameLength: 3
760
+ AllowNamesEndingInNumbers: true
761
+ # Whitelisted names that will not register an offense
762
+ AllowedNames:
763
+ - io
764
+ - id
765
+ # Blacklisted names that will register an offense
766
+ ForbiddenNames: []
767
+
685
768
  Naming/VariableName:
686
769
  EnforcedStyle: snake_case
687
770
  SupportedStyles:
@@ -931,8 +1014,8 @@ Style/EmptyMethod:
931
1014
  Style/For:
932
1015
  EnforcedStyle: each
933
1016
  SupportedStyles:
934
- - for
935
1017
  - each
1018
+ - for
936
1019
 
937
1020
  # Enforce the method used for string formatting.
938
1021
  Style/FormatString:
@@ -1038,6 +1121,16 @@ Style/MethodDefParentheses:
1038
1121
  - require_no_parentheses
1039
1122
  - require_no_parentheses_except_multiline
1040
1123
 
1124
+ Style/MissingElse:
1125
+ EnforcedStyle: both
1126
+ SupportedStyles:
1127
+ # if - warn when an if expression is missing an else branch
1128
+ # case - warn when a case expression is missing an else branch
1129
+ # both - warn when an if or case expression is missing an else branch
1130
+ - if
1131
+ - case
1132
+ - both
1133
+
1041
1134
  # Checks the grouping of mixins (`include`, `extend`, `prepend`) in `class` and
1042
1135
  # `module` bodies.
1043
1136
  Style/MixinGrouping:
@@ -1210,6 +1303,11 @@ Style/SafeNavigation:
1210
1303
  # Safe navigation may cause a statement to start returning `nil` in addition
1211
1304
  # to whatever it used to return.
1212
1305
  ConvertCodeThatCanStartToReturnNil: false
1306
+ Whitelist:
1307
+ - present?
1308
+ - blank?
1309
+ - presence
1310
+ - try
1213
1311
 
1214
1312
  Style/Semicolon:
1215
1313
  # Allow `;` to separate several expressions on the same line.
@@ -1304,11 +1402,22 @@ Style/TrailingCommaInArguments:
1304
1402
  - consistent_comma
1305
1403
  - no_comma
1306
1404
 
1307
- Style/TrailingCommaInLiteral:
1308
- # If `comma`, the cop requires a comma after the last item in an array or
1309
- # hash, but only when each item is on its own line.
1405
+ Style/TrailingCommaInArrayLiteral:
1406
+ # If `comma`, the cop requires a comma after the last item in an array,
1407
+ # but only when each item is on its own line.
1310
1408
  # If `consistent_comma`, the cop requires a comma after the last item of all
1311
- # non-empty array and hash literals.
1409
+ # non-empty array literals.
1410
+ EnforcedStyleForMultiline: no_comma
1411
+ SupportedStylesForMultiline:
1412
+ - comma
1413
+ - consistent_comma
1414
+ - no_comma
1415
+
1416
+ Style/TrailingCommaInHashLiteral:
1417
+ # If `comma`, the cop requires a comma after the last item in a hash,
1418
+ # but only when each item is on its own line.
1419
+ # If `consistent_comma`, the cop requires a comma after the last item of all
1420
+ # non-empty hash literals.
1312
1421
  EnforcedStyleForMultiline: no_comma
1313
1422
  SupportedStylesForMultiline:
1314
1423
  - comma
@@ -1442,46 +1551,6 @@ Metrics/PerceivedComplexity:
1442
1551
  Lint/AssignmentInCondition:
1443
1552
  AllowSafeAssignment: true
1444
1553
 
1445
- # checks whether the end keywords are aligned properly for `do` `end` blocks.
1446
- Lint/BlockAlignment:
1447
- # The value `start_of_block` means that the `end` should be aligned with line
1448
- # where the `do` keyword appears.
1449
- # The value `start_of_line` means it should be aligned with the whole
1450
- # expression's starting line.
1451
- # The value `either` means both are allowed.
1452
- EnforcedStyleAlignWith: either
1453
- SupportedStylesAlignWith:
1454
- - either
1455
- - start_of_block
1456
- - start_of_line
1457
-
1458
- Lint/DefEndAlignment:
1459
- # The value `def` means that `end` should be aligned with the def keyword.
1460
- # The value `start_of_line` means that `end` should be aligned with method
1461
- # calls like `private`, `public`, etc, if present in front of the `def`
1462
- # keyword on the same line.
1463
- EnforcedStyleAlignWith: start_of_line
1464
- SupportedStylesAlignWith:
1465
- - start_of_line
1466
- - def
1467
- AutoCorrect: false
1468
-
1469
- # Align ends correctly.
1470
- Lint/EndAlignment:
1471
- # The value `keyword` means that `end` should be aligned with the matching
1472
- # keyword (`if`, `while`, etc.).
1473
- # The value `variable` means that in assignments, `end` should be aligned
1474
- # with the start of the variable on the left hand side of `=`. In all other
1475
- # situations, `end` should still be aligned with the keyword.
1476
- # The value `start_of_line` means that `end` should be aligned with the start
1477
- # of the line which the matching keyword appears on.
1478
- EnforcedStyleAlignWith: keyword
1479
- SupportedStylesAlignWith:
1480
- - keyword
1481
- - variable
1482
- - start_of_line
1483
- AutoCorrect: false
1484
-
1485
1554
  Lint/InheritException:
1486
1555
  # The default base class in favour of `Exception`.
1487
1556
  EnforcedStyle: runtime_error
@@ -1520,6 +1589,9 @@ Lint/UnusedMethodArgument:
1520
1589
  AllowUnusedKeywordArguments: false
1521
1590
  IgnoreEmptyMethods: true
1522
1591
 
1592
+ Lint/Void:
1593
+ CheckForMethodsWithNoSideEffects: false
1594
+
1523
1595
  #################### Performance ###########################
1524
1596
 
1525
1597
  Performance/DoubleStartEndWith:
@@ -34,6 +34,10 @@ Layout/MultilineAssignmentLayout:
34
34
  StyleGuide: '#indent-conditional-assignment'
35
35
  Enabled: false
36
36
 
37
+ Lint/NumberConversion:
38
+ Description: 'Checks unsafe usage of number conversion methods.'
39
+ Enabled: false
40
+
37
41
  # By default, the rails cops are not run. Override in project or home
38
42
  # directory .rubocop.yml files, or by giving the -R/--rails option.
39
43
  Rails:
@@ -64,6 +68,10 @@ Style/DocumentationMethod:
64
68
  - 'spec/**/*'
65
69
  - 'test/**/*'
66
70
 
71
+ Style/EmptyLineAfterGuardClause:
72
+ Description: 'Add empty line after guard clause.'
73
+ Enabled: false
74
+
67
75
  Style/ImplicitRuntimeError:
68
76
  Description: >-
69
77
  Use `raise` or `fail` with an explicit exception class and
@@ -92,14 +100,6 @@ Style/MissingElse:
92
100
  This will conflict with Style/EmptyElse if
93
101
  Style/EmptyElse is configured to style "both"
94
102
  Enabled: false
95
- EnforcedStyle: both
96
- SupportedStyles:
97
- # if - warn when an if expression is missing an else branch
98
- # case - warn when a case expression is missing an else branch
99
- # both - warn when an if or case expression is missing an else branch
100
- - if
101
- - case
102
- - both
103
103
 
104
104
  Style/OptionHash:
105
105
  Description: "Don't use option hashes when you can use keyword arguments."
@@ -6,6 +6,7 @@ Bundler/DuplicatedGem:
6
6
  Description: 'Checks for duplicate gem entries in Gemfile.'
7
7
  Enabled: true
8
8
  Include:
9
+ - '**/*.gemfile'
9
10
  - '**/Gemfile'
10
11
  - '**/gems.rb'
11
12
 
@@ -16,6 +17,7 @@ Bundler/InsecureProtocolSource:
16
17
  'https://rubygems.org' if possible, or 'http://rubygems.org' if not.
17
18
  Enabled: true
18
19
  Include:
20
+ - '**/*.gemfile'
19
21
  - '**/Gemfile'
20
22
  - '**/gems.rb'
21
23
 
@@ -24,6 +26,7 @@ Bundler/OrderedGems:
24
26
  Gems within groups in the Gemfile should be alphabetically sorted.
25
27
  Enabled: true
26
28
  Include:
29
+ - '**/*.gemfile'
27
30
  - '**/Gemfile'
28
31
  - '**/gems.rb'
29
32
 
@@ -75,6 +78,10 @@ Layout/AlignParameters:
75
78
  StyleGuide: '#no-double-indent'
76
79
  Enabled: true
77
80
 
81
+ Layout/BlockAlignment:
82
+ Description: 'Align block ends correctly.'
83
+ Enabled: true
84
+
78
85
  Layout/BlockEndNewline:
79
86
  Description: 'Put end statement of multiline block on its own line.'
80
87
  Enabled: true
@@ -92,6 +99,17 @@ Layout/CommentIndentation:
92
99
  Description: 'Indentation of comments.'
93
100
  Enabled: true
94
101
 
102
+ Layout/ConditionPosition:
103
+ Description: >-
104
+ Checks for condition placed in a confusing position relative to
105
+ the keyword.
106
+ StyleGuide: '#same-line-condition'
107
+ Enabled: true
108
+
109
+ Layout/DefEndAlignment:
110
+ Description: 'Align ends corresponding to defs correctly.'
111
+ Enabled: true
112
+
95
113
  Layout/DotPosition:
96
114
  Description: 'Checks the position of the dot in multi-line method calls.'
97
115
  StyleGuide: '#consistent-multi-line-chains'
@@ -101,6 +119,10 @@ Layout/ElseAlignment:
101
119
  Description: 'Align elses and elsifs correctly.'
102
120
  Enabled: true
103
121
 
122
+ Layout/EmptyComment:
123
+ Description: 'Checks empty comment.'
124
+ Enabled: true
125
+
104
126
  Layout/EmptyLineAfterMagicComment:
105
127
  Description: 'Add an empty line after magic comments to separate them from code.'
106
128
  StyleGuide: '#separate-magic-comments-from-code'
@@ -155,6 +177,10 @@ Layout/EmptyLinesAroundModuleBody:
155
177
  StyleGuide: '#empty-lines-around-bodies'
156
178
  Enabled: true
157
179
 
180
+ Layout/EndAlignment:
181
+ Description: 'Align ends correctly.'
182
+ Enabled: true
183
+
158
184
  Layout/EndOfLine:
159
185
  Description: 'Use Unix-style line endings.'
160
186
  StyleGuide: '#crlf'
@@ -421,8 +447,8 @@ Lint/AssignmentInCondition:
421
447
  StyleGuide: '#safe-assignment-in-condition'
422
448
  Enabled: true
423
449
 
424
- Lint/BlockAlignment:
425
- Description: 'Align block ends correctly.'
450
+ Lint/BigDecimalNew:
451
+ Description: '`BigDecimal.new()` is deprecated. Use `BigDecimal()` instead.'
426
452
  Enabled: true
427
453
 
428
454
  Lint/BooleanSymbol:
@@ -433,21 +459,10 @@ Lint/CircularArgumentReference:
433
459
  Description: "Default values in optional keyword arguments and optional ordinal arguments should not refer back to the name of the argument."
434
460
  Enabled: true
435
461
 
436
- Lint/ConditionPosition:
437
- Description: >-
438
- Checks for condition placed in a confusing position relative to
439
- the keyword.
440
- StyleGuide: '#same-line-condition'
441
- Enabled: true
442
-
443
462
  Lint/Debugger:
444
463
  Description: 'Check for debugger calls.'
445
464
  Enabled: true
446
465
 
447
- Lint/DefEndAlignment:
448
- Description: 'Align ends corresponding to defs correctly.'
449
- Enabled: true
450
-
451
466
  Lint/DeprecatedClassMethods:
452
467
  Description: 'Check for deprecated class method calls.'
453
468
  Enabled: true
@@ -489,10 +504,6 @@ Lint/EmptyWhen:
489
504
  Description: 'Checks for `when` branches with empty bodies.'
490
505
  Enabled: true
491
506
 
492
- Lint/EndAlignment:
493
- Description: 'Align ends correctly.'
494
- Enabled: true
495
-
496
507
  Lint/EndInMethod:
497
508
  Description: 'END blocks should not be placed inside method definitions.'
498
509
  Enabled: true
@@ -579,6 +590,10 @@ Lint/NonLocalExitFromIterator:
579
590
  Description: 'Do not use return in iterator to cause non-local exit.'
580
591
  Enabled: true
581
592
 
593
+ Lint/OrderedMagicComments:
594
+ Description: 'Checks the proper ordering of magic comments and whether a magic comment is not placed before a shebang.'
595
+ Enabled: true
596
+
582
597
  Lint/ParenthesesAsGroupedExpression:
583
598
  Description: >-
584
599
  Checks for method calls with a space before the opening
@@ -676,13 +691,18 @@ Lint/UnifiedInteger:
676
691
  Description: 'Use Integer instead of Fixnum or Bignum'
677
692
  Enabled: true
678
693
 
679
- Lint/UnneededDisable:
694
+ Lint/UnneededCopDisableDirective:
680
695
  Description: >-
681
696
  Checks for rubocop:disable comments that can be removed.
682
697
  Note: this cop is not disabled when disabling all cops.
683
698
  It must be explicitly disabled.
684
699
  Enabled: true
685
700
 
701
+ Lint/UnneededCopEnableDirective:
702
+ Description: Checks for rubocop:enable comments that can be removed.
703
+
704
+ Enabled: true
705
+
686
706
  Lint/UnneededRequireStatement:
687
707
  Description: 'Checks for unnecessary `require` statement.'
688
708
  Enabled: true
@@ -841,6 +861,11 @@ Naming/HeredocDelimiterNaming:
841
861
  StyleGuide: '#heredoc-delimiters'
842
862
  Enabled: true
843
863
 
864
+ Naming/MemoizedInstanceVariableName:
865
+ Description: >-
866
+ Memoized method name should match memo instance variable name.
867
+ Enabled: true
868
+
844
869
  Naming/MethodName:
845
870
  Description: 'Use the configured style when naming methods.'
846
871
  StyleGuide: '#snake-case-symbols-methods-vars'
@@ -851,6 +876,18 @@ Naming/PredicateName:
851
876
  StyleGuide: '#bool-methods-qmark'
852
877
  Enabled: true
853
878
 
879
+ Naming/UncommunicativeBlockParamName:
880
+ Description: >-
881
+ Checks for block parameter names that contain capital letters,
882
+ end in numbers, or do not meet a minimal length.
883
+ Enabled: true
884
+
885
+ Naming/UncommunicativeMethodParamName:
886
+ Description: >-
887
+ Checks for method parameter names that contain capital letters,
888
+ end in numbers, or do not meet a minimal length.
889
+ Enabled: true
890
+
854
891
  Naming/VariableName:
855
892
  Description: 'Use the configured style when naming variables.'
856
893
  StyleGuide: '#snake-case-symbols-methods-vars'
@@ -939,14 +976,6 @@ Performance/FlatMap:
939
976
  # This can be dangerous since `flat_map` will only flatten 1 level, and
940
977
  # `flatten` without any parameters can flatten multiple levels.
941
978
 
942
- Performance/HashEachMethods:
943
- Description: >-
944
- Use `Hash#each_key` and `Hash#each_value` instead of
945
- `Hash#keys.each` and `Hash#values.each`.
946
- StyleGuide: '#hash-each'
947
- Enabled: true
948
- AutoCorrect: false
949
-
950
979
  Performance/LstripRstrip:
951
980
  Description: 'Use `strip` instead of `lstrip.rstrip`.'
952
981
  Enabled: true
@@ -1037,6 +1066,13 @@ Rails/ActionFilter:
1037
1066
  Description: 'Enforces consistent use of action filter methods.'
1038
1067
  Enabled: true
1039
1068
 
1069
+ Rails/ActiveRecordAliases:
1070
+ Description: >-
1071
+ Avoid Active Record aliases:
1072
+ Use `update` instead of `update_attributes`.
1073
+ Use `update!` instead of `update_attributes!`.
1074
+ Enabled: true
1075
+
1040
1076
  Rails/ActiveSupportAliases:
1041
1077
  Description: >-
1042
1078
  Avoid ActiveSupport aliases of standard ruby methods:
@@ -1253,6 +1289,10 @@ Security/MarshalLoad:
1253
1289
  Reference: 'http://ruby-doc.org/core-2.3.3/Marshal.html#module-Marshal-label-Security+considerations'
1254
1290
  Enabled: true
1255
1291
 
1292
+ Security/Open:
1293
+ Description: 'The use of Kernel#open represents a serious security risk.'
1294
+ Enabled: true
1295
+
1256
1296
  Security/YAMLLoad:
1257
1297
  Description: >-
1258
1298
  Prefer usage of `YAML.safe_load` over `YAML.load` due to potential
@@ -1465,6 +1505,10 @@ Style/EvenOdd:
1465
1505
  StyleGuide: '#predicate-methods'
1466
1506
  Enabled: true
1467
1507
 
1508
+ Style/ExpandPathArguments:
1509
+ Description: "Use `expand_path(__dir__)` instead of `expand_path('..', __FILE__)`."
1510
+ Enabled: true
1511
+
1468
1512
  Style/FlipFlop:
1469
1513
  Description: 'Checks for flip flops'
1470
1514
  StyleGuide: '#no-flip-flops'
@@ -1900,20 +1944,32 @@ Style/TernaryParentheses:
1900
1944
  Description: 'Checks for use of parentheses around ternary conditions.'
1901
1945
  Enabled: true
1902
1946
 
1947
+ Style/TrailingBodyOnClass:
1948
+ Description: 'Class body goes below class statement.'
1949
+ Enabled: true
1950
+
1903
1951
  Style/TrailingBodyOnMethodDefinition:
1904
1952
  Description: 'Method body goes below definition.'
1905
1953
  Enabled: true
1906
1954
 
1955
+ Style/TrailingBodyOnModule:
1956
+ Description: 'Module body goes below module statement.'
1957
+ Enabled: true
1958
+
1907
1959
  Style/TrailingCommaInArguments:
1908
1960
  Description: 'Checks for trailing comma in argument lists.'
1909
1961
  StyleGuide: '#no-trailing-params-comma'
1910
1962
  Enabled: true
1911
1963
 
1912
- Style/TrailingCommaInLiteral:
1913
- Description: 'Checks for trailing comma in array and hash literals.'
1964
+ Style/TrailingCommaInArrayLiteral:
1965
+ Description: 'Checks for trailing comma in array literals.'
1914
1966
  StyleGuide: '#no-trailing-array-commas'
1915
1967
  Enabled: true
1916
1968
 
1969
+ Style/TrailingCommaInHashLiteral:
1970
+ Description: 'Checks for trailing comma in hash literals.'
1971
+ Enabled: true
1972
+
1917
1973
  Style/TrailingMethodEndStatement:
1918
1974
  Description: 'Checks for trailing end statement on line of method body.'
1919
1975
  Enabled: true