rubbycop 0.49.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 (499) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/README.md +211 -0
  4. data/assets/logo.png +0 -0
  5. data/assets/output.html.erb +261 -0
  6. data/bin/rubbycop +17 -0
  7. data/config/default.yml +1548 -0
  8. data/config/disabled.yml +119 -0
  9. data/config/enabled.yml +1734 -0
  10. data/lib/rubbycop.rb +510 -0
  11. data/lib/rubbycop/ast/builder.rb +64 -0
  12. data/lib/rubbycop/ast/node.rb +610 -0
  13. data/lib/rubbycop/ast/node/and_node.rb +37 -0
  14. data/lib/rubbycop/ast/node/array_node.rb +48 -0
  15. data/lib/rubbycop/ast/node/case_node.rb +64 -0
  16. data/lib/rubbycop/ast/node/ensure_node.rb +25 -0
  17. data/lib/rubbycop/ast/node/for_node.rb +53 -0
  18. data/lib/rubbycop/ast/node/hash_node.rb +109 -0
  19. data/lib/rubbycop/ast/node/if_node.rb +138 -0
  20. data/lib/rubbycop/ast/node/keyword_splat_node.rb +45 -0
  21. data/lib/rubbycop/ast/node/mixin/binary_operator_node.rb +23 -0
  22. data/lib/rubbycop/ast/node/mixin/conditional_node.rb +45 -0
  23. data/lib/rubbycop/ast/node/mixin/hash_element_node.rb +125 -0
  24. data/lib/rubbycop/ast/node/mixin/modifier_node.rb +17 -0
  25. data/lib/rubbycop/ast/node/mixin/predicate_operator_node.rb +35 -0
  26. data/lib/rubbycop/ast/node/or_node.rb +37 -0
  27. data/lib/rubbycop/ast/node/pair_node.rb +64 -0
  28. data/lib/rubbycop/ast/node/resbody_node.rb +25 -0
  29. data/lib/rubbycop/ast/node/send_node.rb +209 -0
  30. data/lib/rubbycop/ast/node/until_node.rb +43 -0
  31. data/lib/rubbycop/ast/node/when_node.rb +61 -0
  32. data/lib/rubbycop/ast/node/while_node.rb +43 -0
  33. data/lib/rubbycop/ast/sexp.rb +16 -0
  34. data/lib/rubbycop/ast/traversal.rb +171 -0
  35. data/lib/rubbycop/cached_data.rb +63 -0
  36. data/lib/rubbycop/cli.rb +199 -0
  37. data/lib/rubbycop/comment_config.rb +155 -0
  38. data/lib/rubbycop/config.rb +444 -0
  39. data/lib/rubbycop/config_loader.rb +244 -0
  40. data/lib/rubbycop/config_loader_resolver.rb +43 -0
  41. data/lib/rubbycop/config_store.rb +48 -0
  42. data/lib/rubbycop/cop/autocorrect_logic.rb +26 -0
  43. data/lib/rubbycop/cop/badge.rb +73 -0
  44. data/lib/rubbycop/cop/bundler/duplicated_gem.rb +69 -0
  45. data/lib/rubbycop/cop/bundler/ordered_gems.rb +113 -0
  46. data/lib/rubbycop/cop/commissioner.rb +118 -0
  47. data/lib/rubbycop/cop/cop.rb +222 -0
  48. data/lib/rubbycop/cop/corrector.rb +135 -0
  49. data/lib/rubbycop/cop/force.rb +41 -0
  50. data/lib/rubbycop/cop/ignored_node.rb +38 -0
  51. data/lib/rubbycop/cop/layout/access_modifier_indentation.rb +109 -0
  52. data/lib/rubbycop/cop/layout/align_array.rb +35 -0
  53. data/lib/rubbycop/cop/layout/align_hash.rb +235 -0
  54. data/lib/rubbycop/cop/layout/align_parameters.rb +97 -0
  55. data/lib/rubbycop/cop/layout/block_end_newline.rb +56 -0
  56. data/lib/rubbycop/cop/layout/case_indentation.rb +163 -0
  57. data/lib/rubbycop/cop/layout/closing_parenthesis_indentation.rb +88 -0
  58. data/lib/rubbycop/cop/layout/comment_indentation.rb +71 -0
  59. data/lib/rubbycop/cop/layout/dot_position.rb +84 -0
  60. data/lib/rubbycop/cop/layout/else_alignment.rb +105 -0
  61. data/lib/rubbycop/cop/layout/empty_line_after_magic_comment.rb +63 -0
  62. data/lib/rubbycop/cop/layout/empty_line_between_defs.rb +143 -0
  63. data/lib/rubbycop/cop/layout/empty_lines.rb +60 -0
  64. data/lib/rubbycop/cop/layout/empty_lines_around_access_modifier.rb +90 -0
  65. data/lib/rubbycop/cop/layout/empty_lines_around_begin_body.rb +42 -0
  66. data/lib/rubbycop/cop/layout/empty_lines_around_block_body.rb +41 -0
  67. data/lib/rubbycop/cop/layout/empty_lines_around_class_body.rb +39 -0
  68. data/lib/rubbycop/cop/layout/empty_lines_around_exception_handling_keywords.rb +127 -0
  69. data/lib/rubbycop/cop/layout/empty_lines_around_method_body.rb +41 -0
  70. data/lib/rubbycop/cop/layout/empty_lines_around_module_body.rb +44 -0
  71. data/lib/rubbycop/cop/layout/end_of_line.rb +52 -0
  72. data/lib/rubbycop/cop/layout/extra_spacing.rb +237 -0
  73. data/lib/rubbycop/cop/layout/first_array_element_line_break.rb +41 -0
  74. data/lib/rubbycop/cop/layout/first_hash_element_line_break.rb +33 -0
  75. data/lib/rubbycop/cop/layout/first_method_argument_line_break.rb +49 -0
  76. data/lib/rubbycop/cop/layout/first_method_parameter_line_break.rb +42 -0
  77. data/lib/rubbycop/cop/layout/first_parameter_indentation.rb +109 -0
  78. data/lib/rubbycop/cop/layout/indent_array.rb +114 -0
  79. data/lib/rubbycop/cop/layout/indent_assignment.rb +42 -0
  80. data/lib/rubbycop/cop/layout/indent_hash.rb +134 -0
  81. data/lib/rubbycop/cop/layout/indent_heredoc.rb +173 -0
  82. data/lib/rubbycop/cop/layout/indentation_consistency.rb +51 -0
  83. data/lib/rubbycop/cop/layout/indentation_width.rb +303 -0
  84. data/lib/rubbycop/cop/layout/initial_indentation.rb +42 -0
  85. data/lib/rubbycop/cop/layout/leading_comment_space.rb +43 -0
  86. data/lib/rubbycop/cop/layout/multiline_array_brace_layout.rb +81 -0
  87. data/lib/rubbycop/cop/layout/multiline_assignment_layout.rb +88 -0
  88. data/lib/rubbycop/cop/layout/multiline_block_layout.rb +134 -0
  89. data/lib/rubbycop/cop/layout/multiline_hash_brace_layout.rb +81 -0
  90. data/lib/rubbycop/cop/layout/multiline_method_call_brace_layout.rb +97 -0
  91. data/lib/rubbycop/cop/layout/multiline_method_call_indentation.rb +215 -0
  92. data/lib/rubbycop/cop/layout/multiline_method_definition_brace_layout.rb +82 -0
  93. data/lib/rubbycop/cop/layout/multiline_operation_indentation.rb +89 -0
  94. data/lib/rubbycop/cop/layout/rescue_ensure_alignment.rb +86 -0
  95. data/lib/rubbycop/cop/layout/space_after_colon.rb +40 -0
  96. data/lib/rubbycop/cop/layout/space_after_comma.rb +21 -0
  97. data/lib/rubbycop/cop/layout/space_after_method_name.rb +37 -0
  98. data/lib/rubbycop/cop/layout/space_after_not.rb +38 -0
  99. data/lib/rubbycop/cop/layout/space_after_semicolon.rb +21 -0
  100. data/lib/rubbycop/cop/layout/space_around_block_parameters.rb +109 -0
  101. data/lib/rubbycop/cop/layout/space_around_equals_in_parameter_default.rb +68 -0
  102. data/lib/rubbycop/cop/layout/space_around_keyword.rb +224 -0
  103. data/lib/rubbycop/cop/layout/space_around_operators.rb +142 -0
  104. data/lib/rubbycop/cop/layout/space_before_block_braces.rb +54 -0
  105. data/lib/rubbycop/cop/layout/space_before_comma.rb +16 -0
  106. data/lib/rubbycop/cop/layout/space_before_comment.rb +27 -0
  107. data/lib/rubbycop/cop/layout/space_before_first_arg.rb +64 -0
  108. data/lib/rubbycop/cop/layout/space_before_semicolon.rb +16 -0
  109. data/lib/rubbycop/cop/layout/space_in_lambda_literal.rb +87 -0
  110. data/lib/rubbycop/cop/layout/space_inside_array_percent_literal.rb +53 -0
  111. data/lib/rubbycop/cop/layout/space_inside_block_braces.rb +158 -0
  112. data/lib/rubbycop/cop/layout/space_inside_brackets.rb +20 -0
  113. data/lib/rubbycop/cop/layout/space_inside_hash_literal_braces.rb +150 -0
  114. data/lib/rubbycop/cop/layout/space_inside_parens.rb +16 -0
  115. data/lib/rubbycop/cop/layout/space_inside_percent_literal_delimiters.rb +64 -0
  116. data/lib/rubbycop/cop/layout/space_inside_range_literal.rb +63 -0
  117. data/lib/rubbycop/cop/layout/space_inside_string_interpolation.rb +65 -0
  118. data/lib/rubbycop/cop/layout/tab.rb +57 -0
  119. data/lib/rubbycop/cop/layout/trailing_blank_lines.rb +78 -0
  120. data/lib/rubbycop/cop/layout/trailing_whitespace.rb +28 -0
  121. data/lib/rubbycop/cop/lint/ambiguous_block_association.rb +66 -0
  122. data/lib/rubbycop/cop/lint/ambiguous_operator.rb +55 -0
  123. data/lib/rubbycop/cop/lint/ambiguous_regexp_literal.rb +43 -0
  124. data/lib/rubbycop/cop/lint/assignment_in_condition.rb +80 -0
  125. data/lib/rubbycop/cop/lint/block_alignment.rb +229 -0
  126. data/lib/rubbycop/cop/lint/circular_argument_reference.rb +83 -0
  127. data/lib/rubbycop/cop/lint/condition_position.rb +52 -0
  128. data/lib/rubbycop/cop/lint/debugger.rb +72 -0
  129. data/lib/rubbycop/cop/lint/def_end_alignment.rb +78 -0
  130. data/lib/rubbycop/cop/lint/deprecated_class_methods.rb +90 -0
  131. data/lib/rubbycop/cop/lint/duplicate_case_condition.rb +53 -0
  132. data/lib/rubbycop/cop/lint/duplicate_methods.rb +151 -0
  133. data/lib/rubbycop/cop/lint/duplicated_key.rb +38 -0
  134. data/lib/rubbycop/cop/lint/each_with_object_argument.rb +39 -0
  135. data/lib/rubbycop/cop/lint/else_layout.rb +65 -0
  136. data/lib/rubbycop/cop/lint/empty_ensure.rb +60 -0
  137. data/lib/rubbycop/cop/lint/empty_expression.rb +42 -0
  138. data/lib/rubbycop/cop/lint/empty_interpolation.rb +36 -0
  139. data/lib/rubbycop/cop/lint/empty_when.rb +38 -0
  140. data/lib/rubbycop/cop/lint/end_alignment.rb +157 -0
  141. data/lib/rubbycop/cop/lint/end_in_method.rb +40 -0
  142. data/lib/rubbycop/cop/lint/ensure_return.rb +43 -0
  143. data/lib/rubbycop/cop/lint/float_out_of_range.rb +35 -0
  144. data/lib/rubbycop/cop/lint/format_parameter_mismatch.rb +182 -0
  145. data/lib/rubbycop/cop/lint/handle_exceptions.rb +56 -0
  146. data/lib/rubbycop/cop/lint/implicit_string_concatenation.rb +95 -0
  147. data/lib/rubbycop/cop/lint/ineffective_access_modifier.rb +143 -0
  148. data/lib/rubbycop/cop/lint/inherit_exception.rb +83 -0
  149. data/lib/rubbycop/cop/lint/invalid_character_literal.rb +41 -0
  150. data/lib/rubbycop/cop/lint/literal_in_condition.rb +127 -0
  151. data/lib/rubbycop/cop/lint/literal_in_interpolation.rb +76 -0
  152. data/lib/rubbycop/cop/lint/loop.rb +63 -0
  153. data/lib/rubbycop/cop/lint/multiple_compare.rb +48 -0
  154. data/lib/rubbycop/cop/lint/nested_method_definition.rb +105 -0
  155. data/lib/rubbycop/cop/lint/next_without_accumulator.rb +50 -0
  156. data/lib/rubbycop/cop/lint/non_local_exit_from_iterator.rb +85 -0
  157. data/lib/rubbycop/cop/lint/parentheses_as_grouped_expression.rb +60 -0
  158. data/lib/rubbycop/cop/lint/percent_string_array.rb +84 -0
  159. data/lib/rubbycop/cop/lint/percent_symbol_array.rb +66 -0
  160. data/lib/rubbycop/cop/lint/rand_one.rb +39 -0
  161. data/lib/rubbycop/cop/lint/require_parentheses.rb +61 -0
  162. data/lib/rubbycop/cop/lint/rescue_exception.rb +45 -0
  163. data/lib/rubbycop/cop/lint/safe_navigation_chain.rb +70 -0
  164. data/lib/rubbycop/cop/lint/shadowed_exception.rb +132 -0
  165. data/lib/rubbycop/cop/lint/shadowing_outer_local_variable.rb +53 -0
  166. data/lib/rubbycop/cop/lint/string_conversion_in_interpolation.rb +58 -0
  167. data/lib/rubbycop/cop/lint/syntax.rb +55 -0
  168. data/lib/rubbycop/cop/lint/underscore_prefixed_variable_name.rb +62 -0
  169. data/lib/rubbycop/cop/lint/unified_integer.rb +42 -0
  170. data/lib/rubbycop/cop/lint/unneeded_disable.rb +231 -0
  171. data/lib/rubbycop/cop/lint/unneeded_splat_expansion.rb +141 -0
  172. data/lib/rubbycop/cop/lint/unreachable_code.rb +52 -0
  173. data/lib/rubbycop/cop/lint/unused_block_argument.rb +145 -0
  174. data/lib/rubbycop/cop/lint/unused_method_argument.rb +61 -0
  175. data/lib/rubbycop/cop/lint/useless_access_modifier.rb +229 -0
  176. data/lib/rubbycop/cop/lint/useless_assignment.rb +132 -0
  177. data/lib/rubbycop/cop/lint/useless_comparison.rb +28 -0
  178. data/lib/rubbycop/cop/lint/useless_else_without_rescue.rb +46 -0
  179. data/lib/rubbycop/cop/lint/useless_setter_call.rb +162 -0
  180. data/lib/rubbycop/cop/lint/void.rb +108 -0
  181. data/lib/rubbycop/cop/message_annotator.rb +116 -0
  182. data/lib/rubbycop/cop/metrics/abc_size.rb +39 -0
  183. data/lib/rubbycop/cop/metrics/block_length.rb +32 -0
  184. data/lib/rubbycop/cop/metrics/block_nesting.rb +64 -0
  185. data/lib/rubbycop/cop/metrics/class_length.rb +24 -0
  186. data/lib/rubbycop/cop/metrics/cyclomatic_complexity.rb +31 -0
  187. data/lib/rubbycop/cop/metrics/line_length.rb +168 -0
  188. data/lib/rubbycop/cop/metrics/method_length.rb +27 -0
  189. data/lib/rubbycop/cop/metrics/module_length.rb +24 -0
  190. data/lib/rubbycop/cop/metrics/parameter_lists.rb +45 -0
  191. data/lib/rubbycop/cop/metrics/perceived_complexity.rb +61 -0
  192. data/lib/rubbycop/cop/mixin/access_modifier_node.rb +41 -0
  193. data/lib/rubbycop/cop/mixin/annotation_comment.rb +36 -0
  194. data/lib/rubbycop/cop/mixin/array_hash_indentation.rb +82 -0
  195. data/lib/rubbycop/cop/mixin/array_min_size.rb +59 -0
  196. data/lib/rubbycop/cop/mixin/array_syntax.rb +15 -0
  197. data/lib/rubbycop/cop/mixin/autocorrect_alignment.rb +149 -0
  198. data/lib/rubbycop/cop/mixin/check_assignment.rb +40 -0
  199. data/lib/rubbycop/cop/mixin/classish_length.rb +36 -0
  200. data/lib/rubbycop/cop/mixin/code_length.rb +32 -0
  201. data/lib/rubbycop/cop/mixin/configurable_enforced_style.rb +97 -0
  202. data/lib/rubbycop/cop/mixin/configurable_formatting.rb +48 -0
  203. data/lib/rubbycop/cop/mixin/configurable_max.rb +19 -0
  204. data/lib/rubbycop/cop/mixin/configurable_naming.rb +16 -0
  205. data/lib/rubbycop/cop/mixin/configurable_numbering.rb +17 -0
  206. data/lib/rubbycop/cop/mixin/def_node.rb +27 -0
  207. data/lib/rubbycop/cop/mixin/documentation_comment.rb +46 -0
  208. data/lib/rubbycop/cop/mixin/duplication.rb +46 -0
  209. data/lib/rubbycop/cop/mixin/empty_lines_around_body.rb +161 -0
  210. data/lib/rubbycop/cop/mixin/end_keyword_alignment.rb +85 -0
  211. data/lib/rubbycop/cop/mixin/enforce_superclass.rb +36 -0
  212. data/lib/rubbycop/cop/mixin/first_element_line_break.rb +41 -0
  213. data/lib/rubbycop/cop/mixin/frozen_string_literal.rb +37 -0
  214. data/lib/rubbycop/cop/mixin/hash_alignment.rb +116 -0
  215. data/lib/rubbycop/cop/mixin/ignored_pattern.rb +27 -0
  216. data/lib/rubbycop/cop/mixin/integer_node.rb +12 -0
  217. data/lib/rubbycop/cop/mixin/match_range.rb +22 -0
  218. data/lib/rubbycop/cop/mixin/method_complexity.rb +30 -0
  219. data/lib/rubbycop/cop/mixin/method_preference.rb +30 -0
  220. data/lib/rubbycop/cop/mixin/min_body_length.rb +19 -0
  221. data/lib/rubbycop/cop/mixin/multiline_expression_indentation.rb +183 -0
  222. data/lib/rubbycop/cop/mixin/multiline_literal_brace_layout.rb +152 -0
  223. data/lib/rubbycop/cop/mixin/negative_conditional.rb +43 -0
  224. data/lib/rubbycop/cop/mixin/on_method_def.rb +44 -0
  225. data/lib/rubbycop/cop/mixin/on_normal_if_unless.rb +14 -0
  226. data/lib/rubbycop/cop/mixin/parentheses.rb +22 -0
  227. data/lib/rubbycop/cop/mixin/parser_diagnostic.rb +34 -0
  228. data/lib/rubbycop/cop/mixin/percent_literal.rb +100 -0
  229. data/lib/rubbycop/cop/mixin/preceding_following_alignment.rb +89 -0
  230. data/lib/rubbycop/cop/mixin/rescue_node.rb +21 -0
  231. data/lib/rubbycop/cop/mixin/safe_assignment.rb +20 -0
  232. data/lib/rubbycop/cop/mixin/safe_mode.rb +22 -0
  233. data/lib/rubbycop/cop/mixin/space_after_punctuation.rb +55 -0
  234. data/lib/rubbycop/cop/mixin/space_before_punctuation.rb +48 -0
  235. data/lib/rubbycop/cop/mixin/space_inside.rb +76 -0
  236. data/lib/rubbycop/cop/mixin/statement_modifier.rb +69 -0
  237. data/lib/rubbycop/cop/mixin/string_help.rb +33 -0
  238. data/lib/rubbycop/cop/mixin/string_literals_help.rb +33 -0
  239. data/lib/rubbycop/cop/mixin/surrounding_space.rb +40 -0
  240. data/lib/rubbycop/cop/mixin/target_rails_version.rb +16 -0
  241. data/lib/rubbycop/cop/mixin/target_ruby_version.rb +16 -0
  242. data/lib/rubbycop/cop/mixin/too_many_lines.rb +39 -0
  243. data/lib/rubbycop/cop/mixin/trailing_comma.rb +161 -0
  244. data/lib/rubbycop/cop/mixin/unused_argument.rb +42 -0
  245. data/lib/rubbycop/cop/offense.rb +188 -0
  246. data/lib/rubbycop/cop/performance/caller.rb +41 -0
  247. data/lib/rubbycop/cop/performance/case_when_splat.rb +176 -0
  248. data/lib/rubbycop/cop/performance/casecmp.rb +107 -0
  249. data/lib/rubbycop/cop/performance/compare_with_block.rb +107 -0
  250. data/lib/rubbycop/cop/performance/count.rb +98 -0
  251. data/lib/rubbycop/cop/performance/detect.rb +107 -0
  252. data/lib/rubbycop/cop/performance/double_start_end_with.rb +102 -0
  253. data/lib/rubbycop/cop/performance/end_with.rb +55 -0
  254. data/lib/rubbycop/cop/performance/fixed_size.rb +56 -0
  255. data/lib/rubbycop/cop/performance/flat_map.rb +73 -0
  256. data/lib/rubbycop/cop/performance/hash_each_methods.rb +84 -0
  257. data/lib/rubbycop/cop/performance/lstrip_rstrip.rb +41 -0
  258. data/lib/rubbycop/cop/performance/range_include.rb +41 -0
  259. data/lib/rubbycop/cop/performance/redundant_block_call.rb +93 -0
  260. data/lib/rubbycop/cop/performance/redundant_match.rb +55 -0
  261. data/lib/rubbycop/cop/performance/redundant_merge.rb +149 -0
  262. data/lib/rubbycop/cop/performance/redundant_sort_by.rb +45 -0
  263. data/lib/rubbycop/cop/performance/regexp_match.rb +215 -0
  264. data/lib/rubbycop/cop/performance/reverse_each.rb +40 -0
  265. data/lib/rubbycop/cop/performance/sample.rb +140 -0
  266. data/lib/rubbycop/cop/performance/size.rb +71 -0
  267. data/lib/rubbycop/cop/performance/start_with.rb +58 -0
  268. data/lib/rubbycop/cop/performance/string_replacement.rb +170 -0
  269. data/lib/rubbycop/cop/performance/times_map.rb +61 -0
  270. data/lib/rubbycop/cop/rails/action_filter.rb +96 -0
  271. data/lib/rubbycop/cop/rails/active_support_aliases.rb +68 -0
  272. data/lib/rubbycop/cop/rails/application_job.rb +32 -0
  273. data/lib/rubbycop/cop/rails/application_record.rb +32 -0
  274. data/lib/rubbycop/cop/rails/blank.rb +138 -0
  275. data/lib/rubbycop/cop/rails/date.rb +127 -0
  276. data/lib/rubbycop/cop/rails/delegate.rb +106 -0
  277. data/lib/rubbycop/cop/rails/delegate_allow_blank.rb +51 -0
  278. data/lib/rubbycop/cop/rails/dynamic_find_by.rb +81 -0
  279. data/lib/rubbycop/cop/rails/enum_uniqueness.rb +43 -0
  280. data/lib/rubbycop/cop/rails/exit.rb +61 -0
  281. data/lib/rubbycop/cop/rails/file_path.rb +75 -0
  282. data/lib/rubbycop/cop/rails/find_by.rb +51 -0
  283. data/lib/rubbycop/cop/rails/find_each.rb +47 -0
  284. data/lib/rubbycop/cop/rails/has_and_belongs_to_many.rb +18 -0
  285. data/lib/rubbycop/cop/rails/http_positional_arguments.rb +106 -0
  286. data/lib/rubbycop/cop/rails/not_null_column.rb +67 -0
  287. data/lib/rubbycop/cop/rails/output.rb +23 -0
  288. data/lib/rubbycop/cop/rails/output_safety.rb +58 -0
  289. data/lib/rubbycop/cop/rails/pluralization_grammar.rb +106 -0
  290. data/lib/rubbycop/cop/rails/present.rb +143 -0
  291. data/lib/rubbycop/cop/rails/read_write_attribute.rb +65 -0
  292. data/lib/rubbycop/cop/rails/relative_date_constant.rb +88 -0
  293. data/lib/rubbycop/cop/rails/request_referer.rb +56 -0
  294. data/lib/rubbycop/cop/rails/reversible_migration.rb +216 -0
  295. data/lib/rubbycop/cop/rails/safe_navigation.rb +91 -0
  296. data/lib/rubbycop/cop/rails/save_bang.rb +160 -0
  297. data/lib/rubbycop/cop/rails/scope_args.rb +29 -0
  298. data/lib/rubbycop/cop/rails/skips_model_validations.rb +63 -0
  299. data/lib/rubbycop/cop/rails/time_zone.rb +197 -0
  300. data/lib/rubbycop/cop/rails/uniq_before_pluck.rb +93 -0
  301. data/lib/rubbycop/cop/rails/validation.rb +64 -0
  302. data/lib/rubbycop/cop/registry.rb +171 -0
  303. data/lib/rubbycop/cop/security/eval.rb +30 -0
  304. data/lib/rubbycop/cop/security/json_load.rb +44 -0
  305. data/lib/rubbycop/cop/security/marshal_load.rb +37 -0
  306. data/lib/rubbycop/cop/security/yaml_load.rb +37 -0
  307. data/lib/rubbycop/cop/severity.rb +76 -0
  308. data/lib/rubbycop/cop/style/accessor_method_name.rb +45 -0
  309. data/lib/rubbycop/cop/style/alias.rb +119 -0
  310. data/lib/rubbycop/cop/style/and_or.rb +125 -0
  311. data/lib/rubbycop/cop/style/array_join.rb +30 -0
  312. data/lib/rubbycop/cop/style/ascii_comments.rb +38 -0
  313. data/lib/rubbycop/cop/style/ascii_identifiers.rb +36 -0
  314. data/lib/rubbycop/cop/style/attr.rb +50 -0
  315. data/lib/rubbycop/cop/style/auto_resource_cleanup.rb +42 -0
  316. data/lib/rubbycop/cop/style/bare_percent_literals.rb +57 -0
  317. data/lib/rubbycop/cop/style/begin_block.rb +16 -0
  318. data/lib/rubbycop/cop/style/block_comments.rb +46 -0
  319. data/lib/rubbycop/cop/style/block_delimiters.rb +228 -0
  320. data/lib/rubbycop/cop/style/braces_around_hash_parameters.rb +138 -0
  321. data/lib/rubbycop/cop/style/case_equality.rb +18 -0
  322. data/lib/rubbycop/cop/style/character_literal.rb +43 -0
  323. data/lib/rubbycop/cop/style/class_and_module_camel_case.rb +29 -0
  324. data/lib/rubbycop/cop/style/class_and_module_children.rb +69 -0
  325. data/lib/rubbycop/cop/style/class_check.rb +40 -0
  326. data/lib/rubbycop/cop/style/class_methods.rb +67 -0
  327. data/lib/rubbycop/cop/style/class_vars.rb +23 -0
  328. data/lib/rubbycop/cop/style/collection_methods.rb +51 -0
  329. data/lib/rubbycop/cop/style/colon_method_call.rb +33 -0
  330. data/lib/rubbycop/cop/style/command_literal.rb +119 -0
  331. data/lib/rubbycop/cop/style/comment_annotation.rb +62 -0
  332. data/lib/rubbycop/cop/style/conditional_assignment.rb +691 -0
  333. data/lib/rubbycop/cop/style/constant_name.rb +29 -0
  334. data/lib/rubbycop/cop/style/copyright.rb +89 -0
  335. data/lib/rubbycop/cop/style/def_with_parentheses.rb +31 -0
  336. data/lib/rubbycop/cop/style/documentation.rb +79 -0
  337. data/lib/rubbycop/cop/style/documentation_method.rb +80 -0
  338. data/lib/rubbycop/cop/style/double_negation.rb +35 -0
  339. data/lib/rubbycop/cop/style/each_for_simple_loop.rb +57 -0
  340. data/lib/rubbycop/cop/style/each_with_object.rb +91 -0
  341. data/lib/rubbycop/cop/style/empty_case_condition.rb +84 -0
  342. data/lib/rubbycop/cop/style/empty_else.rb +138 -0
  343. data/lib/rubbycop/cop/style/empty_literal.rb +108 -0
  344. data/lib/rubbycop/cop/style/empty_method.rb +102 -0
  345. data/lib/rubbycop/cop/style/encoding.rb +92 -0
  346. data/lib/rubbycop/cop/style/end_block.rb +17 -0
  347. data/lib/rubbycop/cop/style/even_odd.rb +56 -0
  348. data/lib/rubbycop/cop/style/file_name.rb +183 -0
  349. data/lib/rubbycop/cop/style/flip_flop.rb +20 -0
  350. data/lib/rubbycop/cop/style/for.rb +50 -0
  351. data/lib/rubbycop/cop/style/format_string.rb +46 -0
  352. data/lib/rubbycop/cop/style/format_string_token.rb +141 -0
  353. data/lib/rubbycop/cop/style/frozen_string_literal_comment.rb +96 -0
  354. data/lib/rubbycop/cop/style/global_vars.rb +70 -0
  355. data/lib/rubbycop/cop/style/guard_clause.rb +90 -0
  356. data/lib/rubbycop/cop/style/hash_syntax.rb +214 -0
  357. data/lib/rubbycop/cop/style/identical_conditional_branches.rb +130 -0
  358. data/lib/rubbycop/cop/style/if_inside_else.rb +45 -0
  359. data/lib/rubbycop/cop/style/if_unless_modifier.rb +80 -0
  360. data/lib/rubbycop/cop/style/if_unless_modifier_of_if_unless.rb +38 -0
  361. data/lib/rubbycop/cop/style/if_with_semicolon.rb +20 -0
  362. data/lib/rubbycop/cop/style/implicit_runtime_error.rb +31 -0
  363. data/lib/rubbycop/cop/style/infinite_loop.rb +91 -0
  364. data/lib/rubbycop/cop/style/inline_comment.rb +32 -0
  365. data/lib/rubbycop/cop/style/inverse_methods.rb +130 -0
  366. data/lib/rubbycop/cop/style/lambda.rb +209 -0
  367. data/lib/rubbycop/cop/style/lambda_call.rb +66 -0
  368. data/lib/rubbycop/cop/style/line_end_concatenation.rb +115 -0
  369. data/lib/rubbycop/cop/style/method_call_with_args_parentheses.rb +107 -0
  370. data/lib/rubbycop/cop/style/method_call_without_args_parentheses.rb +75 -0
  371. data/lib/rubbycop/cop/style/method_called_on_do_end_block.rb +44 -0
  372. data/lib/rubbycop/cop/style/method_def_parentheses.rb +83 -0
  373. data/lib/rubbycop/cop/style/method_missing.rb +81 -0
  374. data/lib/rubbycop/cop/style/method_name.rb +28 -0
  375. data/lib/rubbycop/cop/style/missing_else.rb +100 -0
  376. data/lib/rubbycop/cop/style/mixin_grouping.rb +135 -0
  377. data/lib/rubbycop/cop/style/module_function.rb +64 -0
  378. data/lib/rubbycop/cop/style/multiline_block_chain.rb +42 -0
  379. data/lib/rubbycop/cop/style/multiline_if_modifier.rb +63 -0
  380. data/lib/rubbycop/cop/style/multiline_if_then.rb +47 -0
  381. data/lib/rubbycop/cop/style/multiline_memoization.rb +77 -0
  382. data/lib/rubbycop/cop/style/multiline_ternary_operator.rb +19 -0
  383. data/lib/rubbycop/cop/style/mutable_constant.rb +68 -0
  384. data/lib/rubbycop/cop/style/negated_if.rb +103 -0
  385. data/lib/rubbycop/cop/style/negated_while.rb +32 -0
  386. data/lib/rubbycop/cop/style/nested_modifier.rb +87 -0
  387. data/lib/rubbycop/cop/style/nested_parenthesized_calls.rb +61 -0
  388. data/lib/rubbycop/cop/style/nested_ternary_operator.rb +21 -0
  389. data/lib/rubbycop/cop/style/next.rb +225 -0
  390. data/lib/rubbycop/cop/style/nil_comparison.rb +35 -0
  391. data/lib/rubbycop/cop/style/non_nil_check.rb +121 -0
  392. data/lib/rubbycop/cop/style/not.rb +69 -0
  393. data/lib/rubbycop/cop/style/numeric_literal_prefix.rb +97 -0
  394. data/lib/rubbycop/cop/style/numeric_literals.rb +101 -0
  395. data/lib/rubbycop/cop/style/numeric_predicate.rb +140 -0
  396. data/lib/rubbycop/cop/style/one_line_conditional.rb +75 -0
  397. data/lib/rubbycop/cop/style/op_method.rb +41 -0
  398. data/lib/rubbycop/cop/style/option_hash.rb +58 -0
  399. data/lib/rubbycop/cop/style/optional_arguments.rb +62 -0
  400. data/lib/rubbycop/cop/style/parallel_assignment.rb +287 -0
  401. data/lib/rubbycop/cop/style/parentheses_around_condition.rb +56 -0
  402. data/lib/rubbycop/cop/style/percent_literal_delimiters.rb +100 -0
  403. data/lib/rubbycop/cop/style/percent_q_literals.rb +52 -0
  404. data/lib/rubbycop/cop/style/perl_backrefs.rb +31 -0
  405. data/lib/rubbycop/cop/style/predicate_name.rb +67 -0
  406. data/lib/rubbycop/cop/style/preferred_hash_methods.rb +78 -0
  407. data/lib/rubbycop/cop/style/proc.rb +26 -0
  408. data/lib/rubbycop/cop/style/raise_args.rb +140 -0
  409. data/lib/rubbycop/cop/style/redundant_begin.rb +47 -0
  410. data/lib/rubbycop/cop/style/redundant_exception.rb +55 -0
  411. data/lib/rubbycop/cop/style/redundant_freeze.rb +45 -0
  412. data/lib/rubbycop/cop/style/redundant_parentheses.rb +199 -0
  413. data/lib/rubbycop/cop/style/redundant_return.rb +121 -0
  414. data/lib/rubbycop/cop/style/redundant_self.rb +144 -0
  415. data/lib/rubbycop/cop/style/regexp_literal.rb +114 -0
  416. data/lib/rubbycop/cop/style/rescue_modifier.rb +37 -0
  417. data/lib/rubbycop/cop/style/safe_navigation.rb +145 -0
  418. data/lib/rubbycop/cop/style/self_assignment.rb +93 -0
  419. data/lib/rubbycop/cop/style/semicolon.rb +70 -0
  420. data/lib/rubbycop/cop/style/send.rb +21 -0
  421. data/lib/rubbycop/cop/style/signal_exception.rb +109 -0
  422. data/lib/rubbycop/cop/style/single_line_block_params.rb +68 -0
  423. data/lib/rubbycop/cop/style/single_line_methods.rb +77 -0
  424. data/lib/rubbycop/cop/style/special_global_vars.rb +156 -0
  425. data/lib/rubbycop/cop/style/stabby_lambda_parentheses.rb +113 -0
  426. data/lib/rubbycop/cop/style/string_literals.rb +102 -0
  427. data/lib/rubbycop/cop/style/string_literals_in_interpolation.rb +30 -0
  428. data/lib/rubbycop/cop/style/string_methods.rb +34 -0
  429. data/lib/rubbycop/cop/style/struct_inheritance.rb +32 -0
  430. data/lib/rubbycop/cop/style/symbol_array.rb +109 -0
  431. data/lib/rubbycop/cop/style/symbol_literal.rb +32 -0
  432. data/lib/rubbycop/cop/style/symbol_proc.rb +143 -0
  433. data/lib/rubbycop/cop/style/ternary_parentheses.rb +200 -0
  434. data/lib/rubbycop/cop/style/trailing_comma_in_arguments.rb +64 -0
  435. data/lib/rubbycop/cop/style/trailing_comma_in_literal.rb +56 -0
  436. data/lib/rubbycop/cop/style/trailing_underscore_variable.rb +113 -0
  437. data/lib/rubbycop/cop/style/trivial_accessors.rb +176 -0
  438. data/lib/rubbycop/cop/style/unless_else.rb +39 -0
  439. data/lib/rubbycop/cop/style/unneeded_capital_w.rb +41 -0
  440. data/lib/rubbycop/cop/style/unneeded_interpolation.rb +98 -0
  441. data/lib/rubbycop/cop/style/unneeded_percent_q.rb +96 -0
  442. data/lib/rubbycop/cop/style/variable_interpolation.rb +44 -0
  443. data/lib/rubbycop/cop/style/variable_name.rb +39 -0
  444. data/lib/rubbycop/cop/style/variable_number.rb +78 -0
  445. data/lib/rubbycop/cop/style/when_then.rb +24 -0
  446. data/lib/rubbycop/cop/style/while_until_do.rb +36 -0
  447. data/lib/rubbycop/cop/style/while_until_modifier.rb +41 -0
  448. data/lib/rubbycop/cop/style/word_array.rb +114 -0
  449. data/lib/rubbycop/cop/style/zero_length_predicate.rb +90 -0
  450. data/lib/rubbycop/cop/team.rb +193 -0
  451. data/lib/rubbycop/cop/util.rb +309 -0
  452. data/lib/rubbycop/cop/variable_force.rb +458 -0
  453. data/lib/rubbycop/cop/variable_force/assignment.rb +90 -0
  454. data/lib/rubbycop/cop/variable_force/branch.rb +318 -0
  455. data/lib/rubbycop/cop/variable_force/branchable.rb +21 -0
  456. data/lib/rubbycop/cop/variable_force/reference.rb +49 -0
  457. data/lib/rubbycop/cop/variable_force/scope.rb +107 -0
  458. data/lib/rubbycop/cop/variable_force/variable.rb +103 -0
  459. data/lib/rubbycop/cop/variable_force/variable_table.rb +128 -0
  460. data/lib/rubbycop/error.rb +11 -0
  461. data/lib/rubbycop/formatter/base_formatter.rb +123 -0
  462. data/lib/rubbycop/formatter/clang_style_formatter.rb +54 -0
  463. data/lib/rubbycop/formatter/colorizable.rb +41 -0
  464. data/lib/rubbycop/formatter/disabled_config_formatter.rb +181 -0
  465. data/lib/rubbycop/formatter/disabled_lines_formatter.rb +57 -0
  466. data/lib/rubbycop/formatter/emacs_style_formatter.rb +24 -0
  467. data/lib/rubbycop/formatter/file_list_formatter.rb +19 -0
  468. data/lib/rubbycop/formatter/formatter_set.rb +102 -0
  469. data/lib/rubbycop/formatter/fuubar_style_formatter.rb +80 -0
  470. data/lib/rubbycop/formatter/html_formatter.rb +134 -0
  471. data/lib/rubbycop/formatter/json_formatter.rb +74 -0
  472. data/lib/rubbycop/formatter/offense_count_formatter.rb +55 -0
  473. data/lib/rubbycop/formatter/progress_formatter.rb +63 -0
  474. data/lib/rubbycop/formatter/simple_text_formatter.rb +136 -0
  475. data/lib/rubbycop/formatter/text_util.rb +20 -0
  476. data/lib/rubbycop/formatter/worst_offenders_formatter.rb +60 -0
  477. data/lib/rubbycop/magic_comment.rb +210 -0
  478. data/lib/rubbycop/name_similarity.rb +21 -0
  479. data/lib/rubbycop/node_pattern.rb +543 -0
  480. data/lib/rubbycop/options.rb +355 -0
  481. data/lib/rubbycop/path_util.rb +36 -0
  482. data/lib/rubbycop/platform.rb +11 -0
  483. data/lib/rubbycop/processed_source.rb +151 -0
  484. data/lib/rubbycop/rake_task.rb +86 -0
  485. data/lib/rubbycop/remote_config.rb +78 -0
  486. data/lib/rubbycop/result_cache.rb +176 -0
  487. data/lib/rubbycop/rspec/cop_helper.rb +98 -0
  488. data/lib/rubbycop/rspec/host_environment_simulation_helper.rb +32 -0
  489. data/lib/rubbycop/rspec/shared_contexts.rb +98 -0
  490. data/lib/rubbycop/rspec/shared_examples.rb +92 -0
  491. data/lib/rubbycop/rspec/support.rb +8 -0
  492. data/lib/rubbycop/runner.rb +338 -0
  493. data/lib/rubbycop/string_interpreter.rb +57 -0
  494. data/lib/rubbycop/string_util.rb +156 -0
  495. data/lib/rubbycop/target_finder.rb +201 -0
  496. data/lib/rubbycop/token.rb +25 -0
  497. data/lib/rubbycop/version.rb +19 -0
  498. data/lib/rubbycop/warning.rb +11 -0
  499. metadata +663 -0
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ $LOAD_PATH.unshift(File.dirname(File.realpath(__FILE__)) + '/../lib')
5
+
6
+ require 'rubbycop'
7
+ require 'benchmark'
8
+
9
+ cli = RubbyCop::CLI.new
10
+ result = 0
11
+
12
+ time = Benchmark.realtime do
13
+ result = cli.run
14
+ end
15
+
16
+ puts "Finished in #{time} seconds" if cli.options[:debug]
17
+ exit result
@@ -0,0 +1,1548 @@
1
+ # This is the default configuration file. Enabling and disabling is configured
2
+ # in separate files. This file adds all other parameters apart from Enabled.
3
+
4
+ inherit_from:
5
+ - enabled.yml
6
+ - disabled.yml
7
+
8
+ # Common configuration.
9
+ AllCops:
10
+ # Include common Ruby source files.
11
+ Include:
12
+ - '**/*.builder'
13
+ - '**/*.fcgi'
14
+ - '**/*.gemspec'
15
+ - '**/*.god'
16
+ - '**/*.jbuilder'
17
+ - '**/*.mspec'
18
+ - '**/*.opal'
19
+ - '**/*.pluginspec'
20
+ - '**/*.podspec'
21
+ - '**/*.rabl'
22
+ - '**/*.rake'
23
+ - '**/*.rbuild'
24
+ - '**/*.rbw'
25
+ - '**/*.rbx'
26
+ - '**/*.ru'
27
+ - '**/*.ruby'
28
+ - '**/*.spec'
29
+ - '**/*.thor'
30
+ - '**/*.watchr'
31
+ - '**/.irbrc'
32
+ - '**/.pryrc'
33
+ - '**/buildfile'
34
+ - '**/config.ru'
35
+ - '**/Appraisals'
36
+ - '**/Berksfile'
37
+ - '**/Brewfile'
38
+ - '**/Buildfile'
39
+ - '**/Capfile'
40
+ - '**/Cheffile'
41
+ - '**/Dangerfile'
42
+ - '**/Deliverfile'
43
+ - '**/Fastfile'
44
+ - '**/*Fastfile'
45
+ - '**/Gemfile'
46
+ - '**/Guardfile'
47
+ - '**/Jarfile'
48
+ - '**/Mavenfile'
49
+ - '**/Podfile'
50
+ - '**/Puppetfile'
51
+ - '**/Rakefile'
52
+ - '**/Snapfile'
53
+ - '**/Thorfile'
54
+ - '**/Vagabondfile'
55
+ - '**/Vagrantfile'
56
+ Exclude:
57
+ - 'vendor/**/*'
58
+ # Default formatter will be used if no `-f/--format` option is given.
59
+ DefaultFormatter: progress
60
+ # Cop names are not displayed in offense messages by default. Change behavior
61
+ # by overriding DisplayCopNames, or by giving the `-D/--display-cop-names`
62
+ # option.
63
+ DisplayCopNames: false
64
+ # Style guide URLs are not displayed in offense messages by default. Change
65
+ # behavior by overriding `DisplayStyleGuide`, or by giving the
66
+ # `-S/--display-style-guide` option.
67
+ DisplayStyleGuide: false
68
+ # When specifying style guide URLs, any paths and/or fragments will be
69
+ # evaluated relative to the base URL.
70
+ StyleGuideBaseURL: https://github.com/searls/ruby-style-guide
71
+ # Extra details are not displayed in offense messages by default. Change
72
+ # behavior by overriding ExtraDetails, or by giving the
73
+ # `-E/--extra-details` option.
74
+ ExtraDetails: false
75
+ # Additional cops that do not reference a style guide rule may be enabled by
76
+ # default. Change behavior by overriding `StyleGuideCopsOnly`, or by giving
77
+ # the `--only-guide-cops` option.
78
+ StyleGuideCopsOnly: false
79
+ # All cops except the ones in disabled.yml are enabled by default. Change
80
+ # this behavior by overriding either `DisabledByDefault` or `EnabledByDefault`.
81
+ # When `DisabledByDefault` is `true`, all cops in the default configuration
82
+ # are disabled, and only cops in user configuration are enabled. This makes
83
+ # cops opt-in instead of opt-out. Note that when `DisabledByDefault` is `true`,
84
+ # cops in user configuration will be enabled even if they don't set the
85
+ # Enabled parameter.
86
+ # When `EnabledByDefault` is `true`, all cops, even those in disabled.yml,
87
+ # are enabled by default. Cops can still be disabled in user configuration.
88
+ # Note that it is invalid to set both EnabledByDefault and DisabledByDefault
89
+ # to true in the same configuration.
90
+ EnabledByDefault: false
91
+ DisabledByDefault: false
92
+ # Enables the result cache if `true`. Can be overridden by the `--cache` command
93
+ # line option.
94
+ UseCache: true
95
+ # Threshold for how many files can be stored in the result cache before some
96
+ # of the files are automatically removed.
97
+ MaxFilesInCache: 20000
98
+ # The cache will be stored in "rubbycop_cache" under this directory. The name
99
+ # "/tmp" is special and will be converted to the system temporary directory,
100
+ # which is "/tmp" on Unix-like systems, but could be something else on other
101
+ # systems.
102
+ CacheRootDirectory: /tmp
103
+ # The default cache root directory is /tmp, which on most systems is
104
+ # writable by any system user. This means that it is possible for a
105
+ # malicious user to anticipate the location of Rubocop's cache directory,
106
+ # and create a symlink in its place that could cause Rubocop to overwrite
107
+ # unintended files, or read malicious input. If you are certain that your
108
+ # cache location is secure from this kind of attack, and wish to use a
109
+ # symlinked cache location, set this value to "true".
110
+ AllowSymlinksInCacheRootDirectory: false
111
+ # What MRI version of the Ruby interpreter is the inspected code intended to
112
+ # run on? (If there is more than one, set this to the lowest version.)
113
+ # If a value is specified for TargetRubyVersion then it is used.
114
+ # Else if .ruby-version exists and it contains an MRI version it is used.
115
+ # Otherwise we fallback to the oldest officially supported Ruby version (2.1).
116
+ TargetRubyVersion: ~
117
+ TargetRailsVersion: 5.0
118
+
119
+ #################### Layout ###########################
120
+
121
+ # Indent private/protected/public as deep as method definitions
122
+ Layout/AccessModifierIndentation:
123
+ EnforcedStyle: indent
124
+ SupportedStyles:
125
+ - outdent
126
+ - indent
127
+ # By default, the indentation width from Layout/IndentationWidth is used
128
+ # But it can be overridden by setting this parameter
129
+ IndentationWidth: ~
130
+
131
+ # Align the elements of a hash literal if they span more than one line.
132
+ Layout/AlignHash:
133
+ # Alignment of entries using hash rocket as separator. Valid values are:
134
+ #
135
+ # key - left alignment of keys
136
+ # 'a' => 2
137
+ # 'bb' => 3
138
+ # separator - alignment of hash rockets, keys are right aligned
139
+ # 'a' => 2
140
+ # 'bb' => 3
141
+ # table - left alignment of keys, hash rockets, and values
142
+ # 'a' => 2
143
+ # 'bb' => 3
144
+ EnforcedHashRocketStyle: key
145
+ SupportedHashRocketStyles:
146
+ - key
147
+ - separator
148
+ - table
149
+ # Alignment of entries using colon as separator. Valid values are:
150
+ #
151
+ # key - left alignment of keys
152
+ # a: 0
153
+ # bb: 1
154
+ # separator - alignment of colons, keys are right aligned
155
+ # a: 0
156
+ # bb: 1
157
+ # table - left alignment of keys and values
158
+ # a: 0
159
+ # bb: 1
160
+ EnforcedColonStyle: key
161
+ SupportedColonStyles:
162
+ - key
163
+ - separator
164
+ - table
165
+ # Select whether hashes that are the last argument in a method call should be
166
+ # inspected? Valid values are:
167
+ #
168
+ # always_inspect - Inspect both implicit and explicit hashes.
169
+ # Registers an offense for:
170
+ # function(a: 1,
171
+ # b: 2)
172
+ # Registers an offense for:
173
+ # function({a: 1,
174
+ # b: 2})
175
+ # always_ignore - Ignore both implicit and explicit hashes.
176
+ # Accepts:
177
+ # function(a: 1,
178
+ # b: 2)
179
+ # Accepts:
180
+ # function({a: 1,
181
+ # b: 2})
182
+ # ignore_implicit - Ignore only implicit hashes.
183
+ # Accepts:
184
+ # function(a: 1,
185
+ # b: 2)
186
+ # Registers an offense for:
187
+ # function({a: 1,
188
+ # b: 2})
189
+ # ignore_explicit - Ignore only explicit hashes.
190
+ # Accepts:
191
+ # function({a: 1,
192
+ # b: 2})
193
+ # Registers an offense for:
194
+ # function(a: 1,
195
+ # b: 2)
196
+ EnforcedLastArgumentHashStyle: always_inspect
197
+ SupportedLastArgumentHashStyles:
198
+ - always_inspect
199
+ - always_ignore
200
+ - ignore_implicit
201
+ - ignore_explicit
202
+
203
+ Layout/AlignParameters:
204
+ # Alignment of parameters in multi-line method calls.
205
+ #
206
+ # The `with_first_parameter` style aligns the following lines along the same
207
+ # column as the first parameter.
208
+ #
209
+ # method_call(a,
210
+ # b)
211
+ #
212
+ # The `with_fixed_indentation` style aligns the following lines with one
213
+ # level of indentation relative to the start of the line with the method call.
214
+ #
215
+ # method_call(a,
216
+ # b)
217
+ EnforcedStyle: with_first_parameter
218
+ SupportedStyles:
219
+ - with_first_parameter
220
+ - with_fixed_indentation
221
+ # By default, the indentation width from Layout/IndentationWidth is used
222
+ # But it can be overridden by setting this parameter
223
+ IndentationWidth: ~
224
+
225
+ # Indentation of `when`.
226
+ Layout/CaseIndentation:
227
+ EnforcedStyle: case
228
+ SupportedStyles:
229
+ - case
230
+ - end
231
+ IndentOneStep: false
232
+ # By default, the indentation width from `Layout/IndentationWidth` is used.
233
+ # But it can be overridden by setting this parameter.
234
+ # This only matters if `IndentOneStep` is `true`
235
+ IndentationWidth: ~
236
+
237
+ # Multi-line method chaining should be done with leading dots.
238
+ Layout/DotPosition:
239
+ EnforcedStyle: leading
240
+ SupportedStyles:
241
+ - leading
242
+ - trailing
243
+
244
+ # Use empty lines between defs.
245
+ Layout/EmptyLineBetweenDefs:
246
+ # If `true`, this parameter means that single line method definitions don't
247
+ # need an empty line between them.
248
+ AllowAdjacentOneLineDefs: false
249
+ # Can be array to specify minimum and maximum number of empty lines, e.g. [1, 2]
250
+ NumberOfEmptyLines: 1
251
+
252
+ Layout/EmptyLinesAroundBlockBody:
253
+ EnforcedStyle: no_empty_lines
254
+ SupportedStyles:
255
+ - empty_lines
256
+ - no_empty_lines
257
+
258
+ Layout/EmptyLinesAroundClassBody:
259
+ EnforcedStyle: no_empty_lines
260
+ SupportedStyles:
261
+ - empty_lines
262
+ - empty_lines_except_namespace
263
+ - empty_lines_special
264
+ - no_empty_lines
265
+
266
+ Layout/EmptyLinesAroundModuleBody:
267
+ EnforcedStyle: no_empty_lines
268
+ SupportedStyles:
269
+ - empty_lines
270
+ - empty_lines_except_namespace
271
+ - empty_lines_special
272
+ - no_empty_lines
273
+
274
+ Layout/EndOfLine:
275
+ # The `native` style means that CR+LF (Carriage Return + Line Feed) is
276
+ # enforced on Windows, and LF is enforced on other platforms. The other styles
277
+ # mean LF and CR+LF, respectively.
278
+ EnforcedStyle: native
279
+ SupportedStyles:
280
+ - native
281
+ - lf
282
+ - crlf
283
+
284
+ Layout/ExtraSpacing:
285
+ # When true, allows most uses of extra spacing if the intent is to align
286
+ # things with the previous or next line, not counting empty lines or comment
287
+ # lines.
288
+ AllowForAlignment: true
289
+ # When true, forces the alignment of `=` in assignments on consecutive lines.
290
+ ForceEqualSignAlignment: false
291
+
292
+ Layout/FirstParameterIndentation:
293
+ EnforcedStyle: special_for_inner_method_call_in_parentheses
294
+ SupportedStyles:
295
+ # The first parameter should always be indented one step more than the
296
+ # preceding line.
297
+ - consistent
298
+ # The first parameter should normally be indented one step more than the
299
+ # preceding line, but if it's a parameter for a method call that is itself
300
+ # a parameter in a method call, then the inner parameter should be indented
301
+ # relative to the inner method.
302
+ - special_for_inner_method_call
303
+ # Same as `special_for_inner_method_call` except that the special rule only
304
+ # applies if the outer method call encloses its arguments in parentheses.
305
+ - special_for_inner_method_call_in_parentheses
306
+ # By default, the indentation width from `Layout/IndentationWidth` is used
307
+ # But it can be overridden by setting this parameter
308
+ IndentationWidth: ~
309
+
310
+ Layout/IndentationConsistency:
311
+ # The difference between `rails` and `normal` is that the `rails` style
312
+ # prescribes that in classes and modules the `protected` and `private`
313
+ # modifier keywords shall be indented the same as public methods and that
314
+ # protected and private members shall be indented one step more than the
315
+ # modifiers. Other than that, both styles mean that entities on the same
316
+ # logical depth shall have the same indentation.
317
+ EnforcedStyle: normal
318
+ SupportedStyles:
319
+ - normal
320
+ - rails
321
+
322
+ Layout/IndentationWidth:
323
+ # Number of spaces for each indentation level.
324
+ Width: 2
325
+ IgnoredPatterns: []
326
+
327
+ # Checks the indentation of the first element in an array literal.
328
+ Layout/IndentArray:
329
+ # The value `special_inside_parentheses` means that array literals with
330
+ # brackets that have their opening bracket on the same line as a surrounding
331
+ # opening round parenthesis, shall have their first element indented relative
332
+ # to the first position inside the parenthesis.
333
+ #
334
+ # The value `consistent` means that the indentation of the first element shall
335
+ # always be relative to the first position of the line where the opening
336
+ # bracket is.
337
+ #
338
+ # The value `align_brackets` means that the indentation of the first element
339
+ # shall always be relative to the position of the opening bracket.
340
+ EnforcedStyle: special_inside_parentheses
341
+ SupportedStyles:
342
+ - special_inside_parentheses
343
+ - consistent
344
+ - align_brackets
345
+ # By default, the indentation width from `Layout/IndentationWidth` is used
346
+ # But it can be overridden by setting this parameter
347
+ IndentationWidth: ~
348
+
349
+ # Checks the indentation of assignment RHS, when on a different line from LHS
350
+ Layout/IndentAssignment:
351
+ # By default, the indentation width from `Layout/IndentationWidth` is used
352
+ # But it can be overridden by setting this parameter
353
+ IndentationWidth: ~
354
+
355
+ # Checks the indentation of the first key in a hash literal.
356
+ Layout/IndentHash:
357
+ # The value `special_inside_parentheses` means that hash literals with braces
358
+ # that have their opening brace on the same line as a surrounding opening
359
+ # round parenthesis, shall have their first key indented relative to the
360
+ # first position inside the parenthesis.
361
+ #
362
+ # The value `consistent` means that the indentation of the first key shall
363
+ # always be relative to the first position of the line where the opening
364
+ # brace is.
365
+ #
366
+ # The value `align_braces` means that the indentation of the first key shall
367
+ # always be relative to the position of the opening brace.
368
+ EnforcedStyle: special_inside_parentheses
369
+ SupportedStyles:
370
+ - special_inside_parentheses
371
+ - consistent
372
+ - align_braces
373
+ # By default, the indentation width from `Layout/IndentationWidth` is used
374
+ # But it can be overridden by setting this parameter
375
+ IndentationWidth: ~
376
+
377
+ Layout/IndentHeredoc:
378
+ EnforcedStyle: auto_detection
379
+ SupportedStyles:
380
+ - auto_detection
381
+ - squiggly
382
+ - active_support
383
+ - powerpack
384
+ - unindent
385
+
386
+ Layout/SpaceInLambdaLiteral:
387
+ EnforcedStyle: require_no_space
388
+ SupportedStyles:
389
+ - require_no_space
390
+ - require_space
391
+
392
+ Layout/MultilineArrayBraceLayout:
393
+ EnforcedStyle: symmetrical
394
+ SupportedStyles:
395
+ # symmetrical: closing brace is positioned in same way as opening brace
396
+ # new_line: closing brace is always on a new line
397
+ # same_line: closing brace is always on the same line as last element
398
+ - symmetrical
399
+ - new_line
400
+ - same_line
401
+
402
+ Layout/MultilineAssignmentLayout:
403
+ # The types of assignments which are subject to this rule.
404
+ SupportedTypes:
405
+ - block
406
+ - case
407
+ - class
408
+ - if
409
+ - kwbegin
410
+ - module
411
+ EnforcedStyle: new_line
412
+ SupportedStyles:
413
+ # Ensures that the assignment operator and the rhs are on the same line for
414
+ # the set of supported types.
415
+ - same_line
416
+ # Ensures that the assignment operator and the rhs are on separate lines
417
+ # for the set of supported types.
418
+ - new_line
419
+
420
+ Layout/MultilineHashBraceLayout:
421
+ EnforcedStyle: symmetrical
422
+ SupportedStyles:
423
+ # symmetrical: closing brace is positioned in same way as opening brace
424
+ # new_line: closing brace is always on a new line
425
+ # same_line: closing brace is always on same line as last element
426
+ - symmetrical
427
+ - new_line
428
+ - same_line
429
+
430
+ Layout/MultilineMethodCallBraceLayout:
431
+ EnforcedStyle: symmetrical
432
+ SupportedStyles:
433
+ # symmetrical: closing brace is positioned in same way as opening brace
434
+ # new_line: closing brace is always on a new line
435
+ # same_line: closing brace is always on the same line as last argument
436
+ - symmetrical
437
+ - new_line
438
+ - same_line
439
+
440
+ Layout/MultilineMethodCallIndentation:
441
+ EnforcedStyle: aligned
442
+ SupportedStyles:
443
+ - aligned
444
+ - indented
445
+ - indented_relative_to_receiver
446
+ # By default, the indentation width from Layout/IndentationWidth is used
447
+ # But it can be overridden by setting this parameter
448
+ IndentationWidth: ~
449
+
450
+ Layout/MultilineMethodDefinitionBraceLayout:
451
+ EnforcedStyle: symmetrical
452
+ SupportedStyles:
453
+ # symmetrical: closing brace is positioned in same way as opening brace
454
+ # new_line: closing brace is always on a new line
455
+ # same_line: closing brace is always on the same line as last parameter
456
+ - symmetrical
457
+ - new_line
458
+ - same_line
459
+
460
+ Layout/MultilineOperationIndentation:
461
+ EnforcedStyle: aligned
462
+ SupportedStyles:
463
+ - aligned
464
+ - indented
465
+ # By default, the indentation width from `Layout/IndentationWidth` is used
466
+ # But it can be overridden by setting this parameter
467
+ IndentationWidth: ~
468
+
469
+ Layout/SpaceAroundBlockParameters:
470
+ EnforcedStyleInsidePipes: no_space
471
+ SupportedStylesInsidePipes:
472
+ - space
473
+ - no_space
474
+
475
+ Layout/SpaceAroundEqualsInParameterDefault:
476
+ EnforcedStyle: space
477
+ SupportedStyles:
478
+ - space
479
+ - no_space
480
+
481
+ Layout/SpaceAroundOperators:
482
+ # When `true`, allows most uses of extra spacing if the intent is to align
483
+ # with an operator on the previous or next line, not counting empty lines
484
+ # or comment lines.
485
+ AllowForAlignment: true
486
+
487
+ Layout/SpaceBeforeBlockBraces:
488
+ EnforcedStyle: space
489
+ SupportedStyles:
490
+ - space
491
+ - no_space
492
+
493
+ Layout/SpaceBeforeFirstArg:
494
+ # When `true`, allows most uses of extra spacing if the intent is to align
495
+ # things with the previous or next line, not counting empty lines or comment
496
+ # lines.
497
+ AllowForAlignment: true
498
+
499
+ Layout/SpaceInsideBlockBraces:
500
+ EnforcedStyle: space
501
+ SupportedStyles:
502
+ - space
503
+ - no_space
504
+ EnforcedStyleForEmptyBraces: no_space
505
+ SupportedStylesForEmptyBraces:
506
+ - space
507
+ - no_space
508
+ # Space between `{` and `|`. Overrides `EnforcedStyle` if there is a conflict.
509
+ SpaceBeforeBlockParameters: true
510
+
511
+ Layout/SpaceInsideHashLiteralBraces:
512
+ EnforcedStyle: space
513
+ SupportedStyles:
514
+ - space
515
+ - no_space
516
+ # 'compact' normally requires a space inside hash braces, with the exception
517
+ # that successive left braces or right braces are collapsed together
518
+ - compact
519
+ EnforcedStyleForEmptyBraces: no_space
520
+ SupportedStylesForEmptyBraces:
521
+ - space
522
+ - no_space
523
+
524
+ Layout/SpaceInsideStringInterpolation:
525
+ EnforcedStyle: no_space
526
+ SupportedStyles:
527
+ - space
528
+ - no_space
529
+
530
+ Layout/TrailingBlankLines:
531
+ EnforcedStyle: final_newline
532
+ SupportedStyles:
533
+ - final_newline
534
+ - final_blank_line
535
+
536
+ #################### Style ###########################
537
+
538
+ Style/Alias:
539
+ EnforcedStyle: prefer_alias
540
+ SupportedStyles:
541
+ - prefer_alias
542
+ - prefer_alias_method
543
+
544
+ Style/AndOr:
545
+ # Whether `and` and `or` are banned only in conditionals (conditionals)
546
+ # or completely (always).
547
+ EnforcedStyle: always
548
+ SupportedStyles:
549
+ - always
550
+ - conditionals
551
+
552
+ # Checks if usage of `%()` or `%Q()` matches configuration.
553
+ Style/BarePercentLiterals:
554
+ EnforcedStyle: bare_percent
555
+ SupportedStyles:
556
+ - percent_q
557
+ - bare_percent
558
+
559
+ Style/BlockDelimiters:
560
+ EnforcedStyle: line_count_based
561
+ SupportedStyles:
562
+ # The `line_count_based` style enforces braces around single line blocks and
563
+ # do..end around multi-line blocks.
564
+ - line_count_based
565
+ # The `semantic` style enforces braces around functional blocks, where the
566
+ # primary purpose of the block is to return a value and do..end for
567
+ # procedural blocks, where the primary purpose of the block is its
568
+ # side-effects.
569
+ #
570
+ # This looks at the usage of a block's method to determine its type (e.g. is
571
+ # the result of a `map` assigned to a variable or passed to another
572
+ # method) but exceptions are permitted in the `ProceduralMethods`,
573
+ # `FunctionalMethods` and `IgnoredMethods` sections below.
574
+ - semantic
575
+ # The `braces_for_chaining` style enforces braces around single line blocks
576
+ # and do..end around multi-line blocks, except for multi-line blocks whose
577
+ # return value is being chained with another method (in which case braces
578
+ # are enforced).
579
+ - braces_for_chaining
580
+ ProceduralMethods:
581
+ # Methods that are known to be procedural in nature but look functional from
582
+ # their usage, e.g.
583
+ #
584
+ # time = Benchmark.realtime do
585
+ # foo.bar
586
+ # end
587
+ #
588
+ # Here, the return value of the block is discarded but the return value of
589
+ # `Benchmark.realtime` is used.
590
+ - benchmark
591
+ - bm
592
+ - bmbm
593
+ - create
594
+ - each_with_object
595
+ - measure
596
+ - new
597
+ - realtime
598
+ - tap
599
+ - with_object
600
+ FunctionalMethods:
601
+ # Methods that are known to be functional in nature but look procedural from
602
+ # their usage, e.g.
603
+ #
604
+ # let(:foo) { Foo.new }
605
+ #
606
+ # Here, the return value of `Foo.new` is used to define a `foo` helper but
607
+ # doesn't appear to be used from the return value of `let`.
608
+ - let
609
+ - let!
610
+ - subject
611
+ - watch
612
+ IgnoredMethods:
613
+ # Methods that can be either procedural or functional and cannot be
614
+ # categorised from their usage alone, e.g.
615
+ #
616
+ # foo = lambda do |x|
617
+ # puts "Hello, #{x}"
618
+ # end
619
+ #
620
+ # foo = lambda do |x|
621
+ # x * 100
622
+ # end
623
+ #
624
+ # Here, it is impossible to tell from the return value of `lambda` whether
625
+ # the inner block's return value is significant.
626
+ - lambda
627
+ - proc
628
+ - it
629
+
630
+ Style/BracesAroundHashParameters:
631
+ EnforcedStyle: no_braces
632
+ SupportedStyles:
633
+ # The `braces` style enforces braces around all method parameters that are
634
+ # hashes.
635
+ - braces
636
+ # The `no_braces` style checks that the last parameter doesn't have braces
637
+ # around it.
638
+ - no_braces
639
+ # The `context_dependent` style checks that the last parameter doesn't have
640
+ # braces around it, but requires braces if the second to last parameter is
641
+ # also a hash literal.
642
+ - context_dependent
643
+
644
+ Style/ClassAndModuleChildren:
645
+ # Checks the style of children definitions at classes and modules.
646
+ #
647
+ # Basically there are two different styles:
648
+ #
649
+ # `nested` - have each child on a separate line
650
+ # class Foo
651
+ # class Bar
652
+ # end
653
+ # end
654
+ #
655
+ # `compact` - combine definitions as much as possible
656
+ # class Foo::Bar
657
+ # end
658
+ #
659
+ # The compact style is only forced, for classes or modules with one child.
660
+ EnforcedStyle: nested
661
+ SupportedStyles:
662
+ - nested
663
+ - compact
664
+
665
+ Style/ClassCheck:
666
+ EnforcedStyle: is_a?
667
+ SupportedStyles:
668
+ - is_a?
669
+ - kind_of?
670
+
671
+ # Align with the style guide.
672
+ Style/CollectionMethods:
673
+ # Mapping from undesired method to desired_method
674
+ # e.g. to use `detect` over `find`:
675
+ #
676
+ # CollectionMethods:
677
+ # PreferredMethods:
678
+ # find: detect
679
+ PreferredMethods:
680
+ collect: 'map'
681
+ collect!: 'map!'
682
+ inject: 'reduce'
683
+ detect: 'find'
684
+ find_all: 'select'
685
+
686
+ # Use '`' or '%x' around command literals.
687
+ Style/CommandLiteral:
688
+ EnforcedStyle: backticks
689
+ # backticks: Always use backticks.
690
+ # percent_x: Always use `%x`.
691
+ # mixed: Use backticks on single-line commands, and `%x` on multi-line commands.
692
+ SupportedStyles:
693
+ - backticks
694
+ - percent_x
695
+ - mixed
696
+ # If `false`, the cop will always recommend using `%x` if one or more backticks
697
+ # are found in the command string.
698
+ AllowInnerBackticks: false
699
+
700
+ # Checks formatting of special comments
701
+ Style/CommentAnnotation:
702
+ Keywords:
703
+ - TODO
704
+ - FIXME
705
+ - OPTIMIZE
706
+ - HACK
707
+ - REVIEW
708
+
709
+ Style/ConditionalAssignment:
710
+ EnforcedStyle: assign_to_condition
711
+ SupportedStyles:
712
+ - assign_to_condition
713
+ - assign_inside_condition
714
+ # When configured to `assign_to_condition`, `SingleLineConditionsOnly`
715
+ # will only register an offense when all branches of a condition are
716
+ # a single line.
717
+ # When configured to `assign_inside_condition`, `SingleLineConditionsOnly`
718
+ # will only register an offense for assignment to a condition that has
719
+ # at least one multiline branch.
720
+ SingleLineConditionsOnly: true
721
+ IncludeTernaryExpressions: true
722
+
723
+ # Checks that you have put a copyright in a comment before any code.
724
+ #
725
+ # You can override the default Notice in your .rubbycop.yml file.
726
+ #
727
+ # In order to use autocorrect, you must supply a value for the
728
+ # `AutocorrectNotice` key that matches the regexp Notice. A blank
729
+ # `AutocorrectNotice` will cause an error during autocorrect.
730
+ #
731
+ # Autocorrect will add a copyright notice in a comment at the top
732
+ # of the file immediately after any shebang or encoding comments.
733
+ #
734
+ # Example rubbycop.yml:
735
+ #
736
+ # Style/Copyright:
737
+ # Enabled: true
738
+ # Notice: 'Copyright (\(c\) )?2015 Yahoo! Inc'
739
+ # AutocorrectNotice: '# Copyright (c) 2015 Yahoo! Inc.'
740
+ #
741
+ Style/Copyright:
742
+ Notice: '^Copyright (\(c\) )?2[0-9]{3} .+'
743
+ AutocorrectNotice: ''
744
+
745
+ Style/DocumentationMethod:
746
+ RequireForNonPublicMethods: false
747
+
748
+ # Warn on empty else statements
749
+ # empty - warn only on empty `else`
750
+ # nil - warn on `else` with nil in it
751
+ # both - warn on empty `else` and `else` with `nil` in it
752
+ Style/EmptyElse:
753
+ EnforcedStyle: both
754
+ SupportedStyles:
755
+ - empty
756
+ - nil
757
+ - both
758
+
759
+ Style/EmptyMethod:
760
+ EnforcedStyle: compact
761
+ SupportedStyles:
762
+ - compact
763
+ - expanded
764
+
765
+ # Checks whether the source file has a utf-8 encoding comment or not
766
+ # AutoCorrectEncodingComment must match the regex
767
+ # /#.*coding\s?[:=]\s?(?:UTF|utf)-8/
768
+ Style/Encoding:
769
+ EnforcedStyle: never
770
+ SupportedStyles:
771
+ - when_needed
772
+ - always
773
+ - never
774
+ AutoCorrectEncodingComment: '# encoding: utf-8'
775
+
776
+ Style/FileName:
777
+ # File names listed in `AllCops:Include` are excluded by default. Add extra
778
+ # excludes here.
779
+ Exclude: []
780
+ # When `true`, requires that each source file should define a class or module
781
+ # with a name which matches the file name (converted to ... case).
782
+ # It further expects it to be nested inside modules which match the names
783
+ # of subdirectories in its path.
784
+ ExpectMatchingDefinition: false
785
+ # If non-`nil`, expect all source file names to match the following regex.
786
+ # Only the file name itself is matched, not the entire file path.
787
+ # Use anchors as necessary if you want to match the entire name rather than
788
+ # just a part of it.
789
+ Regex: ~
790
+ # With `IgnoreExecutableScripts` set to `true`, this cop does not
791
+ # report offending filenames for executable scripts (i.e. source
792
+ # files with a shebang in the first line).
793
+ IgnoreExecutableScripts: true
794
+ AllowedAcronyms:
795
+ - CLI
796
+ - DSL
797
+ - ACL
798
+ - API
799
+ - ASCII
800
+ - CPU
801
+ - CSS
802
+ - DNS
803
+ - EOF
804
+ - GUID
805
+ - HTML
806
+ - HTTP
807
+ - HTTPS
808
+ - ID
809
+ - IP
810
+ - JSON
811
+ - LHS
812
+ - QPS
813
+ - RAM
814
+ - RHS
815
+ - RPC
816
+ - SLA
817
+ - SMTP
818
+ - SQL
819
+ - SSH
820
+ - TCP
821
+ - TLS
822
+ - TTL
823
+ - UDP
824
+ - UI
825
+ - UID
826
+ - UUID
827
+ - URI
828
+ - URL
829
+ - UTF8
830
+ - VM
831
+ - XML
832
+ - XMPP
833
+ - XSRF
834
+ - XSS
835
+
836
+ # Checks use of for or each in multiline loops.
837
+ Style/For:
838
+ EnforcedStyle: each
839
+ SupportedStyles:
840
+ - for
841
+ - each
842
+
843
+ # Enforce the method used for string formatting.
844
+ Style/FormatString:
845
+ EnforcedStyle: format
846
+ SupportedStyles:
847
+ - format
848
+ - sprintf
849
+ - percent
850
+
851
+ # Enforce using either `%<token>s` or `%{token}`
852
+ Style/FormatStringToken:
853
+ EnforcedStyle: annotated
854
+ SupportedStyles:
855
+ # Prefer tokens which contain a sprintf like type annotation like
856
+ # `%<name>s`, `%<age>d`, `%<score>f`
857
+ - annotated
858
+ # Prefer simple looking "template" style tokens like `%{name}`, `%{age}`
859
+ - template
860
+
861
+ Style/FrozenStringLiteralComment:
862
+ EnforcedStyle: when_needed
863
+ SupportedStyles:
864
+ # `when_needed` will add the frozen string literal comment to files
865
+ # only when the `TargetRubyVersion` is set to 2.3+.
866
+ - when_needed
867
+ # `always` will always add the frozen string literal comment to a file
868
+ # regardless of the Ruby version or if `freeze` or `<<` are called on a
869
+ # string literal. If you run code against multiple versions of Ruby, it is
870
+ # possible that this will create errors in Ruby 2.3.0+.
871
+ - always
872
+ # `never` will enforce that the frozen string literal comment does not
873
+ # exist in a file.
874
+ - never
875
+
876
+ # Built-in global variables are allowed by default.
877
+ Style/GlobalVars:
878
+ AllowedVariables: []
879
+
880
+ # `MinBodyLength` defines the number of lines of the a body of an `if` or `unless`
881
+ # needs to have to trigger this cop
882
+ Style/GuardClause:
883
+ MinBodyLength: 1
884
+
885
+ Style/HashSyntax:
886
+ EnforcedStyle: ruby19
887
+ SupportedStyles:
888
+ # checks for 1.9 syntax (e.g. {a: 1}) for all symbol keys
889
+ - ruby19
890
+ # checks for hash rocket syntax for all hashes
891
+ - hash_rockets
892
+ # forbids mixed key syntaxes (e.g. {a: 1, :b => 2})
893
+ - no_mixed_keys
894
+ # enforces both ruby19 and no_mixed_keys styles
895
+ - ruby19_no_mixed_keys
896
+ # Force hashes that have a symbol value to use hash rockets
897
+ UseHashRocketsWithSymbolValues: false
898
+ # Do not suggest { a?: 1 } over { :a? => 1 } in ruby19 style
899
+ PreferHashRocketsForNonAlnumEndingSymbols: false
900
+
901
+ Style/IfUnlessModifier:
902
+ MaxLineLength: 80
903
+
904
+ Style/InverseMethods:
905
+ Enabled: true
906
+ # `InverseMethods` are methods that can be inverted by a not (`not` or `!`)
907
+ # The relationship of inverse methods only needs to be defined in one direction.
908
+ # Keys and values both need to be defined as symbols.
909
+ InverseMethods:
910
+ :any?: :none?
911
+ :even?: :odd?
912
+ :==: :!=
913
+ :=~: :!~
914
+ :<: :>=
915
+ :>: :<=
916
+ # `ActiveSupport` defines some common inverse methods. They are listed below,
917
+ # and not enabled by default.
918
+ #:present?: :blank?,
919
+ #:include?: :exclude?
920
+ # `InverseBlocks` are methods that are inverted by inverting the return
921
+ # of the block that is passed to the method
922
+ InverseBlocks:
923
+ :select: :reject
924
+ :select!: :reject!
925
+
926
+ Style/Lambda:
927
+ EnforcedStyle: line_count_dependent
928
+ SupportedStyles:
929
+ - line_count_dependent
930
+ - lambda
931
+ - literal
932
+
933
+ Style/LambdaCall:
934
+ EnforcedStyle: call
935
+ SupportedStyles:
936
+ - call
937
+ - braces
938
+
939
+ Style/MethodCallWithArgsParentheses:
940
+ IgnoreMacros: true
941
+ IgnoredMethods: []
942
+
943
+ Style/MethodDefParentheses:
944
+ EnforcedStyle: require_parentheses
945
+ SupportedStyles:
946
+ - require_parentheses
947
+ - require_no_parentheses
948
+ - require_no_parentheses_except_multiline
949
+
950
+ Style/MethodName:
951
+ EnforcedStyle: snake_case
952
+ SupportedStyles:
953
+ - snake_case
954
+ - camelCase
955
+
956
+ # Checks the grouping of mixins (`include`, `extend`, `prepend`) in `class` and
957
+ # `module` bodies.
958
+ Style/MixinGrouping:
959
+ EnforcedStyle: separated
960
+ SupportedStyles:
961
+ # separated: each mixed in module goes in a separate statement.
962
+ # grouped: mixed in modules are grouped into a single statement.
963
+ - separated
964
+ - grouped
965
+
966
+ Style/ModuleFunction:
967
+ EnforcedStyle: module_function
968
+ SupportedStyles:
969
+ - module_function
970
+ - extend_self
971
+
972
+ Style/MultilineMemoization:
973
+ EnforcedStyle: keyword
974
+ SupportedStyles:
975
+ - keyword
976
+ - braces
977
+
978
+ Style/NegatedIf:
979
+ EnforcedStyle: both
980
+ SupportedStyles:
981
+ # both: prefix and postfix negated `if` should both use `unless`
982
+ # prefix: only use `unless` for negated `if` statements positioned before the body of the statement
983
+ # postfix: only use `unless` for negated `if` statements positioned after the body of the statement
984
+ - both
985
+ - prefix
986
+ - postfix
987
+
988
+ Style/Next:
989
+ # With `always` all conditions at the end of an iteration needs to be
990
+ # replaced by next - with `skip_modifier_ifs` the modifier if like this one
991
+ # are ignored: [1, 2].each { |a| return 'yes' if a == 1 }
992
+ EnforcedStyle: skip_modifier_ifs
993
+ # `MinBodyLength` defines the number of lines of the a body of an `if` or `unless`
994
+ # needs to have to trigger this cop
995
+ MinBodyLength: 3
996
+ SupportedStyles:
997
+ - skip_modifier_ifs
998
+ - always
999
+
1000
+ Style/NonNilCheck:
1001
+ # With `IncludeSemanticChanges` set to `true`, this cop reports offenses for
1002
+ # `!x.nil?` and autocorrects that and `x != nil` to solely `x`, which is
1003
+ # **usually** OK, but might change behavior.
1004
+ #
1005
+ # With `IncludeSemanticChanges` set to `false`, this cop does not report
1006
+ # offenses for `!x.nil?` and does no changes that might change behavior.
1007
+ IncludeSemanticChanges: false
1008
+
1009
+ Style/NumericLiterals:
1010
+ MinDigits: 5
1011
+ Strict: false
1012
+
1013
+ Style/NumericLiteralPrefix:
1014
+ EnforcedOctalStyle: zero_with_o
1015
+ SupportedOctalStyles:
1016
+ - zero_with_o
1017
+ - zero_only
1018
+
1019
+ Style/NumericPredicate:
1020
+ EnforcedStyle: predicate
1021
+ SupportedStyles:
1022
+ - predicate
1023
+ - comparison
1024
+ # Exclude RSpec specs because assertions like `expect(1).to be > 0` cause
1025
+ # false positives.
1026
+ Exclude:
1027
+ - 'spec/**/*'
1028
+
1029
+ Style/OptionHash:
1030
+ # A list of parameter names that will be flagged by this cop.
1031
+ SuspiciousParamNames:
1032
+ - options
1033
+ - opts
1034
+ - args
1035
+ - params
1036
+ - parameters
1037
+
1038
+ # Allow safe assignment in conditions.
1039
+ Style/ParenthesesAroundCondition:
1040
+ AllowSafeAssignment: true
1041
+
1042
+ Style/PercentLiteralDelimiters:
1043
+ # Specify the default preferred delimiter for all types with the 'default' key
1044
+ # Override individual delimiters (even with default specified) by specifying
1045
+ # an individual key
1046
+ PreferredDelimiters:
1047
+ default: ()
1048
+ '%i': '[]'
1049
+ '%I': '[]'
1050
+ '%r': '{}'
1051
+ '%w': '[]'
1052
+ '%W': '[]'
1053
+
1054
+ Style/PercentQLiterals:
1055
+ EnforcedStyle: lower_case_q
1056
+ SupportedStyles:
1057
+ - lower_case_q # Use `%q` when possible, `%Q` when necessary
1058
+ - upper_case_q # Always use `%Q`
1059
+
1060
+ Style/PredicateName:
1061
+ # Predicate name prefixes.
1062
+ NamePrefix:
1063
+ - is_
1064
+ - has_
1065
+ - have_
1066
+ # Predicate name prefixes that should be removed.
1067
+ NamePrefixBlacklist:
1068
+ - is_
1069
+ - has_
1070
+ - have_
1071
+ # Predicate names which, despite having a blacklisted prefix, or no `?`,
1072
+ # should still be accepted
1073
+ NameWhitelist:
1074
+ - is_a?
1075
+ # Exclude Rspec specs because there is a strong convention to write spec
1076
+ # helpers in the form of `have_something` or `be_something`.
1077
+ Exclude:
1078
+ - 'spec/**/*'
1079
+
1080
+ Style/PreferredHashMethods:
1081
+ EnforcedStyle: short
1082
+ SupportedStyles:
1083
+ - short
1084
+ - verbose
1085
+
1086
+ Style/RaiseArgs:
1087
+ EnforcedStyle: exploded
1088
+ SupportedStyles:
1089
+ - compact # raise Exception.new(msg)
1090
+ - exploded # raise Exception, msg
1091
+
1092
+ Style/RedundantReturn:
1093
+ # When `true` allows code like `return x, y`.
1094
+ AllowMultipleReturnValues: false
1095
+
1096
+ # Use `/` or `%r` around regular expressions.
1097
+ Style/RegexpLiteral:
1098
+ EnforcedStyle: slashes
1099
+ # slashes: Always use slashes.
1100
+ # percent_r: Always use `%r`.
1101
+ # mixed: Use slashes on single-line regexes, and `%r` on multi-line regexes.
1102
+ SupportedStyles:
1103
+ - slashes
1104
+ - percent_r
1105
+ - mixed
1106
+ # If `false`, the cop will always recommend using `%r` if one or more slashes
1107
+ # are found in the regexp string.
1108
+ AllowInnerSlashes: false
1109
+
1110
+ Style/SafeNavigation:
1111
+ # Safe navigation may cause a statement to start returning `nil` in addition
1112
+ # to whatever it used to return.
1113
+ ConvertCodeThatCanStartToReturnNil: false
1114
+
1115
+ Style/Semicolon:
1116
+ # Allow `;` to separate several expressions on the same line.
1117
+ AllowAsExpressionSeparator: false
1118
+
1119
+ Style/SignalException:
1120
+ EnforcedStyle: only_raise
1121
+ SupportedStyles:
1122
+ - only_raise
1123
+ - only_fail
1124
+ - semantic
1125
+
1126
+ Style/SingleLineBlockParams:
1127
+ Methods:
1128
+ - reduce:
1129
+ - acc
1130
+ - elem
1131
+ - inject:
1132
+ - acc
1133
+ - elem
1134
+
1135
+ Style/SingleLineMethods:
1136
+ AllowIfMethodIsEmpty: true
1137
+
1138
+ Style/SpecialGlobalVars:
1139
+ EnforcedStyle: use_english_names
1140
+ SupportedStyles:
1141
+ - use_perl_names
1142
+ - use_english_names
1143
+
1144
+ Style/StabbyLambdaParentheses:
1145
+ EnforcedStyle: require_parentheses
1146
+ SupportedStyles:
1147
+ - require_parentheses
1148
+ - require_no_parentheses
1149
+
1150
+ Style/StringLiterals:
1151
+ EnforcedStyle: single_quotes
1152
+ SupportedStyles:
1153
+ - single_quotes
1154
+ - double_quotes
1155
+ # If `true`, strings which span multiple lines using `\` for continuation must
1156
+ # use the same type of quotes on each line.
1157
+ ConsistentQuotesInMultiline: false
1158
+
1159
+ Style/StringLiteralsInInterpolation:
1160
+ EnforcedStyle: single_quotes
1161
+ SupportedStyles:
1162
+ - single_quotes
1163
+ - double_quotes
1164
+
1165
+ Style/StringMethods:
1166
+ # Mapping from undesired method to desired_method
1167
+ # e.g. to use `to_sym` over `intern`:
1168
+ #
1169
+ # StringMethods:
1170
+ # PreferredMethods:
1171
+ # intern: to_sym
1172
+ PreferredMethods:
1173
+ intern: to_sym
1174
+
1175
+ Style/SymbolArray:
1176
+ EnforcedStyle: percent
1177
+ MinSize: 0
1178
+ SupportedStyles:
1179
+ - percent
1180
+ - brackets
1181
+
1182
+ Style/SymbolProc:
1183
+ # A list of method names to be ignored by the check.
1184
+ # The names should be fairly unique, otherwise you'll end up ignoring lots of code.
1185
+ IgnoredMethods:
1186
+ - respond_to
1187
+ - define_method
1188
+
1189
+ Style/TernaryParentheses:
1190
+ EnforcedStyle: require_no_parentheses
1191
+ SupportedStyles:
1192
+ - require_parentheses
1193
+ - require_no_parentheses
1194
+ - require_parentheses_when_complex
1195
+ AllowSafeAssignment: true
1196
+
1197
+ Style/TrailingCommaInArguments:
1198
+ # If `comma`, the cop requires a comma after the last argument, but only for
1199
+ # parenthesized method calls where each argument is on its own line.
1200
+ # If `consistent_comma`, the cop requires a comma after the last argument,
1201
+ # for all parenthesized method calls with arguments.
1202
+ EnforcedStyleForMultiline: no_comma
1203
+ SupportedStylesForMultiline:
1204
+ - comma
1205
+ - consistent_comma
1206
+ - no_comma
1207
+
1208
+ Style/TrailingCommaInLiteral:
1209
+ # If `comma`, the cop requires a comma after the last item in an array or
1210
+ # hash, but only when each item is on its own line.
1211
+ # If `consistent_comma`, the cop requires a comma after the last item of all
1212
+ # non-empty array and hash literals.
1213
+ EnforcedStyleForMultiline: no_comma
1214
+ SupportedStylesForMultiline:
1215
+ - comma
1216
+ - consistent_comma
1217
+ - no_comma
1218
+
1219
+ # `TrivialAccessors` requires exact name matches and doesn't allow
1220
+ # predicated methods by default.
1221
+ Style/TrivialAccessors:
1222
+ # When set to `false` the cop will suggest the use of accessor methods
1223
+ # in situations like:
1224
+ #
1225
+ # def name
1226
+ # @other_name
1227
+ # end
1228
+ #
1229
+ # This way you can uncover "hidden" attributes in your code.
1230
+ ExactNameMatch: true
1231
+ AllowPredicates: true
1232
+ # Allows trivial writers that don't end in an equal sign. e.g.
1233
+ #
1234
+ # def on_exception(action)
1235
+ # @on_exception=action
1236
+ # end
1237
+ # on_exception :restart
1238
+ #
1239
+ # Commonly used in DSLs
1240
+ AllowDSLWriters: false
1241
+ IgnoreClassMethods: false
1242
+ Whitelist:
1243
+ - to_ary
1244
+ - to_a
1245
+ - to_c
1246
+ - to_enum
1247
+ - to_h
1248
+ - to_hash
1249
+ - to_i
1250
+ - to_int
1251
+ - to_io
1252
+ - to_open
1253
+ - to_path
1254
+ - to_proc
1255
+ - to_r
1256
+ - to_regexp
1257
+ - to_str
1258
+ - to_s
1259
+ - to_sym
1260
+
1261
+ Style/VariableName:
1262
+ EnforcedStyle: snake_case
1263
+ SupportedStyles:
1264
+ - snake_case
1265
+ - camelCase
1266
+
1267
+ Style/VariableNumber:
1268
+ EnforcedStyle: normalcase
1269
+ SupportedStyles:
1270
+ - snake_case
1271
+ - normalcase
1272
+ - non_integer
1273
+
1274
+ Style/WhileUntilModifier:
1275
+ MaxLineLength: 80
1276
+
1277
+ # `WordArray` enforces how array literals of word-like strings should be expressed.
1278
+ Style/WordArray:
1279
+ EnforcedStyle: percent
1280
+ SupportedStyles:
1281
+ # percent style: %w(word1 word2)
1282
+ - percent
1283
+ # bracket style: ['word1', 'word2']
1284
+ - brackets
1285
+ # The `MinSize` option causes the `WordArray` rule to be ignored for arrays
1286
+ # smaller than a certain size. The rule is only applied to arrays
1287
+ # whose element count is greater than or equal to `MinSize`.
1288
+ MinSize: 0
1289
+ # The regular expression `WordRegex` decides what is considered a word.
1290
+ WordRegex: !ruby/regexp '/\A[\p{Word}\n\t]+\z/'
1291
+
1292
+ #################### Metrics ###############################
1293
+
1294
+ Metrics/AbcSize:
1295
+ # The ABC size is a calculated magnitude, so this number can be an Integer or
1296
+ # a Float.
1297
+ Max: 15
1298
+
1299
+ Metrics/BlockLength:
1300
+ CountComments: false # count full line comments?
1301
+ Max: 25
1302
+ ExcludedMethods: []
1303
+
1304
+ Metrics/BlockNesting:
1305
+ CountBlocks: false
1306
+ Max: 3
1307
+
1308
+ Metrics/ClassLength:
1309
+ CountComments: false # count full line comments?
1310
+ Max: 100
1311
+
1312
+ # Avoid complex methods.
1313
+ Metrics/CyclomaticComplexity:
1314
+ Max: 6
1315
+
1316
+ Metrics/LineLength:
1317
+ Max: 80
1318
+ # To make it possible to copy or click on URIs in the code, we allow lines
1319
+ # containing a URI to be longer than Max.
1320
+ AllowHeredoc: true
1321
+ AllowURI: true
1322
+ URISchemes:
1323
+ - http
1324
+ - https
1325
+ # The IgnoreCopDirectives option causes the LineLength rule to ignore cop
1326
+ # directives like '# rubbycop: enable ...' when calculating a line's length.
1327
+ IgnoreCopDirectives: false
1328
+ # The IgnoredPatterns option is a list of !ruby/regexp and/or string
1329
+ # elements. Strings will be converted to Regexp objects. A line that matches
1330
+ # any regular expression listed in this option will be ignored by LineLength.
1331
+ IgnoredPatterns: []
1332
+
1333
+ Metrics/MethodLength:
1334
+ CountComments: false # count full line comments?
1335
+ Max: 10
1336
+
1337
+ Metrics/ModuleLength:
1338
+ CountComments: false # count full line comments?
1339
+ Max: 100
1340
+
1341
+ Metrics/ParameterLists:
1342
+ Max: 5
1343
+ CountKeywordArgs: true
1344
+
1345
+ Metrics/PerceivedComplexity:
1346
+ Max: 7
1347
+
1348
+ #################### Lint ##################################
1349
+
1350
+ # Allow safe assignment in conditions.
1351
+ Lint/AssignmentInCondition:
1352
+ AllowSafeAssignment: true
1353
+
1354
+ # checks whether the end keywords are aligned properly for `do` `end` blocks.
1355
+ Lint/BlockAlignment:
1356
+ # The value `start_of_block` means that the `end` should be aligned with line
1357
+ # where the `do` keyword appears.
1358
+ # The value `start_of_line` means it should be aligned with the whole
1359
+ # expression's starting line.
1360
+ # The value `either` means both are allowed.
1361
+ EnforcedStyleAlignWith: either
1362
+ SupportedStylesAlignWith:
1363
+ - either
1364
+ - start_of_block
1365
+ - start_of_line
1366
+
1367
+ Lint/DefEndAlignment:
1368
+ # The value `def` means that `end` should be aligned with the def keyword.
1369
+ # The value `start_of_line` means that `end` should be aligned with method
1370
+ # calls like `private`, `public`, etc, if present in front of the `def`
1371
+ # keyword on the same line.
1372
+ EnforcedStyleAlignWith: start_of_line
1373
+ SupportedStylesAlignWith:
1374
+ - start_of_line
1375
+ - def
1376
+ AutoCorrect: false
1377
+
1378
+ # Align ends correctly.
1379
+ Lint/EndAlignment:
1380
+ # The value `keyword` means that `end` should be aligned with the matching
1381
+ # keyword (`if`, `while`, etc.).
1382
+ # The value `variable` means that in assignments, `end` should be aligned
1383
+ # with the start of the variable on the left hand side of `=`. In all other
1384
+ # situations, `end` should still be aligned with the keyword.
1385
+ # The value `start_of_line` means that `end` should be aligned with the start
1386
+ # of the line which the matching keyword appears on.
1387
+ EnforcedStyleAlignWith: keyword
1388
+ SupportedStylesAlignWith:
1389
+ - keyword
1390
+ - variable
1391
+ - start_of_line
1392
+ AutoCorrect: false
1393
+
1394
+ Lint/InheritException:
1395
+ # The default base class in favour of `Exception`.
1396
+ EnforcedStyle: runtime_error
1397
+ SupportedStyles:
1398
+ - runtime_error
1399
+ - standard_error
1400
+
1401
+ Lint/SafeNavigationChain:
1402
+ Whitelist:
1403
+ - present?
1404
+ - blank?
1405
+ - presence
1406
+ - try
1407
+
1408
+ # Checks for unused block arguments
1409
+ Lint/UnusedBlockArgument:
1410
+ IgnoreEmptyBlocks: true
1411
+ AllowUnusedKeywordArguments: false
1412
+
1413
+ # Checks for unused method arguments.
1414
+ Lint/UnusedMethodArgument:
1415
+ AllowUnusedKeywordArguments: false
1416
+ IgnoreEmptyMethods: true
1417
+
1418
+ #################### Performance ###########################
1419
+
1420
+ Performance/DoubleStartEndWith:
1421
+ # Used to check for `starts_with?` and `ends_with?`.
1422
+ # These methods are defined by `ActiveSupport`.
1423
+ IncludeActiveSupportAliases: false
1424
+
1425
+ Performance/RedundantMerge:
1426
+ # Max number of key-value pairs to consider an offense
1427
+ MaxKeyValuePairs: 2
1428
+
1429
+ #################### Rails #################################
1430
+
1431
+ Rails/ActionFilter:
1432
+ EnforcedStyle: action
1433
+ SupportedStyles:
1434
+ - action
1435
+ - filter
1436
+ Include:
1437
+ - app/controllers/**/*.rb
1438
+
1439
+ Rails/Date:
1440
+ # The value `strict` disallows usage of `Date.today`, `Date.current`,
1441
+ # `Date#to_time` etc.
1442
+ # The value `flexible` allows usage of `Date.current`, `Date.yesterday`, etc
1443
+ # (but not `Date.today`) which are overridden by ActiveSupport to handle current
1444
+ # time zone.
1445
+ EnforcedStyle: flexible
1446
+ SupportedStyles:
1447
+ - strict
1448
+ - flexible
1449
+
1450
+ Rails/DynamicFindBy:
1451
+ Whitelist:
1452
+ - find_by_sql
1453
+
1454
+ Rails/EnumUniqueness:
1455
+ Include:
1456
+ - app/models/**/*.rb
1457
+
1458
+ Rails/Exit:
1459
+ Include:
1460
+ - app/**/*.rb
1461
+ - config/**/*.rb
1462
+ - lib/**/*.rb
1463
+ Exclude:
1464
+ - lib/**/*.rake
1465
+
1466
+ Rails/FindBy:
1467
+ Include:
1468
+ - app/models/**/*.rb
1469
+
1470
+ Rails/FindEach:
1471
+ Include:
1472
+ - app/models/**/*.rb
1473
+
1474
+ Rails/HasAndBelongsToMany:
1475
+ Include:
1476
+ - app/models/**/*.rb
1477
+
1478
+ Rails/NotNullColumn:
1479
+ Include:
1480
+ - db/migrate/*.rb
1481
+
1482
+ Rails/Output:
1483
+ Include:
1484
+ - app/**/*.rb
1485
+ - config/**/*.rb
1486
+ - db/**/*.rb
1487
+ - lib/**/*.rb
1488
+
1489
+ Rails/ReadWriteAttribute:
1490
+ Include:
1491
+ - app/models/**/*.rb
1492
+
1493
+ Rails/RequestReferer:
1494
+ EnforcedStyle: referer
1495
+ SupportedStyles:
1496
+ - referer
1497
+ - referrer
1498
+
1499
+ Rails/ReversibleMigration:
1500
+ Include:
1501
+ - db/migrate/*.rb
1502
+
1503
+ Rails/SafeNavigation:
1504
+ # This will convert usages of `try` to use safe navigation as well as `try!`.
1505
+ # `try` and `try!` work slighly differently. `try!` and safe navigation will
1506
+ # both raise a `NoMethodError` if the receiver of the method call does not
1507
+ # implement the intended method. `try` will not raise an exception for this.
1508
+ ConvertTry: false
1509
+
1510
+ Rails/ScopeArgs:
1511
+ Include:
1512
+ - app/models/**/*.rb
1513
+
1514
+ Rails/TimeZone:
1515
+ # The value `strict` means that `Time` should be used with `zone`.
1516
+ # The value `flexible` allows usage of `in_time_zone` instead of `zone`.
1517
+ EnforcedStyle: flexible
1518
+ SupportedStyles:
1519
+ - strict
1520
+ - flexible
1521
+
1522
+ Rails/UniqBeforePluck:
1523
+ EnforcedStyle: conservative
1524
+ SupportedStyles:
1525
+ - conservative
1526
+ - aggressive
1527
+ AutoCorrect: false
1528
+
1529
+ Rails/SkipsModelValidations:
1530
+ Blacklist:
1531
+ - decrement!
1532
+ - decrement_counter
1533
+ - increment!
1534
+ - increment_counter
1535
+ - toggle!
1536
+ - touch
1537
+ - update_all
1538
+ - update_attribute
1539
+ - update_column
1540
+ - update_columns
1541
+ - update_counters
1542
+
1543
+ Rails/Validation:
1544
+ Include:
1545
+ - app/models/**/*.rb
1546
+
1547
+ Bundler/OrderedGems:
1548
+ TreatCommentsAsGroupSeparators: true