rubocop 0.48.1 → 0.49.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (184) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -3
  3. data/config/default.yml +397 -357
  4. data/config/disabled.yml +29 -29
  5. data/config/enabled.yml +366 -326
  6. data/lib/rubocop.rb +85 -70
  7. data/lib/rubocop/ast/builder.rb +4 -1
  8. data/lib/rubocop/ast/node.rb +2 -2
  9. data/lib/rubocop/ast/node/and_node.rb +1 -1
  10. data/lib/rubocop/ast/node/args_node.rb +24 -0
  11. data/lib/rubocop/ast/node/block_node.rb +107 -0
  12. data/lib/rubocop/ast/node/case_node.rb +1 -1
  13. data/lib/rubocop/ast/node/ensure_node.rb +1 -1
  14. data/lib/rubocop/ast/node/for_node.rb +1 -1
  15. data/lib/rubocop/ast/node/if_node.rb +1 -1
  16. data/lib/rubocop/ast/node/mixin/parameterized_node.rb +74 -0
  17. data/lib/rubocop/ast/node/or_node.rb +1 -1
  18. data/lib/rubocop/ast/node/pair_node.rb +1 -1
  19. data/lib/rubocop/ast/node/resbody_node.rb +1 -1
  20. data/lib/rubocop/ast/node/send_node.rb +36 -57
  21. data/lib/rubocop/ast/node/super_node.rb +42 -0
  22. data/lib/rubocop/ast/node/until_node.rb +1 -1
  23. data/lib/rubocop/ast/node/when_node.rb +1 -1
  24. data/lib/rubocop/ast/node/while_node.rb +1 -1
  25. data/lib/rubocop/cli.rb +10 -0
  26. data/lib/rubocop/config.rb +23 -7
  27. data/lib/rubocop/config_loader.rb +19 -3
  28. data/lib/rubocop/cop/badge.rb +1 -1
  29. data/lib/rubocop/cop/bundler/duplicated_gem.rb +2 -2
  30. data/lib/rubocop/cop/commissioner.rb +1 -1
  31. data/lib/rubocop/cop/cop.rb +10 -0
  32. data/lib/rubocop/cop/{style → layout}/access_modifier_indentation.rb +33 -3
  33. data/lib/rubocop/cop/{style → layout}/align_array.rb +16 -1
  34. data/lib/rubocop/cop/{style → layout}/align_hash.rb +1 -1
  35. data/lib/rubocop/cop/{style → layout}/align_parameters.rb +29 -1
  36. data/lib/rubocop/cop/{style → layout}/block_end_newline.rb +10 -5
  37. data/lib/rubocop/cop/{style → layout}/case_indentation.rb +64 -1
  38. data/lib/rubocop/cop/{style → layout}/closing_parenthesis_indentation.rb +2 -2
  39. data/lib/rubocop/cop/{style → layout}/comment_indentation.rb +1 -1
  40. data/lib/rubocop/cop/{style → layout}/dot_position.rb +1 -1
  41. data/lib/rubocop/cop/{style → layout}/else_alignment.rb +1 -1
  42. data/lib/rubocop/cop/{style → layout}/empty_line_after_magic_comment.rb +1 -1
  43. data/lib/rubocop/cop/{style → layout}/empty_line_between_defs.rb +1 -1
  44. data/lib/rubocop/cop/{style → layout}/empty_lines.rb +1 -1
  45. data/lib/rubocop/cop/{style → layout}/empty_lines_around_access_modifier.rb +2 -7
  46. data/lib/rubocop/cop/{style → layout}/empty_lines_around_begin_body.rb +1 -1
  47. data/lib/rubocop/cop/{style → layout}/empty_lines_around_block_body.rb +2 -4
  48. data/lib/rubocop/cop/{style → layout}/empty_lines_around_class_body.rb +1 -1
  49. data/lib/rubocop/cop/{style → layout}/empty_lines_around_exception_handling_keywords.rb +1 -1
  50. data/lib/rubocop/cop/{style → layout}/empty_lines_around_method_body.rb +1 -1
  51. data/lib/rubocop/cop/{style → layout}/empty_lines_around_module_body.rb +1 -1
  52. data/lib/rubocop/cop/{style → layout}/end_of_line.rb +1 -1
  53. data/lib/rubocop/cop/{style → layout}/extra_spacing.rb +1 -1
  54. data/lib/rubocop/cop/{style → layout}/first_array_element_line_break.rb +1 -1
  55. data/lib/rubocop/cop/{style → layout}/first_hash_element_line_break.rb +1 -1
  56. data/lib/rubocop/cop/{style → layout}/first_method_argument_line_break.rb +1 -1
  57. data/lib/rubocop/cop/{style → layout}/first_method_parameter_line_break.rb +1 -1
  58. data/lib/rubocop/cop/{style → layout}/first_parameter_indentation.rb +1 -1
  59. data/lib/rubocop/cop/{style → layout}/indent_array.rb +1 -1
  60. data/lib/rubocop/cop/{style → layout}/indent_assignment.rb +1 -1
  61. data/lib/rubocop/cop/{style → layout}/indent_hash.rb +2 -2
  62. data/lib/rubocop/cop/{style → layout}/indent_heredoc.rb +3 -3
  63. data/lib/rubocop/cop/{style → layout}/indentation_consistency.rb +1 -1
  64. data/lib/rubocop/cop/{style → layout}/indentation_width.rb +10 -12
  65. data/lib/rubocop/cop/{style → layout}/initial_indentation.rb +1 -1
  66. data/lib/rubocop/cop/{style → layout}/leading_comment_space.rb +1 -1
  67. data/lib/rubocop/cop/{style → layout}/multiline_array_brace_layout.rb +1 -1
  68. data/lib/rubocop/cop/{style → layout}/multiline_assignment_layout.rb +1 -1
  69. data/lib/rubocop/cop/{style → layout}/multiline_block_layout.rb +21 -36
  70. data/lib/rubocop/cop/{style → layout}/multiline_hash_brace_layout.rb +5 -1
  71. data/lib/rubocop/cop/{style → layout}/multiline_method_call_brace_layout.rb +1 -1
  72. data/lib/rubocop/cop/{style → layout}/multiline_method_call_indentation.rb +3 -3
  73. data/lib/rubocop/cop/{style → layout}/multiline_method_definition_brace_layout.rb +1 -1
  74. data/lib/rubocop/cop/{style → layout}/multiline_operation_indentation.rb +6 -5
  75. data/lib/rubocop/cop/{style → layout}/rescue_ensure_alignment.rb +1 -1
  76. data/lib/rubocop/cop/{style → layout}/space_after_colon.rb +2 -2
  77. data/lib/rubocop/cop/{style → layout}/space_after_comma.rb +2 -2
  78. data/lib/rubocop/cop/{style → layout}/space_after_method_name.rb +1 -1
  79. data/lib/rubocop/cop/{style → layout}/space_after_not.rb +1 -1
  80. data/lib/rubocop/cop/{style → layout}/space_after_semicolon.rb +2 -2
  81. data/lib/rubocop/cop/{style → layout}/space_around_block_parameters.rb +7 -5
  82. data/lib/rubocop/cop/{style → layout}/space_around_equals_in_parameter_default.rb +1 -1
  83. data/lib/rubocop/cop/{style → layout}/space_around_keyword.rb +1 -1
  84. data/lib/rubocop/cop/{style → layout}/space_around_operators.rb +6 -2
  85. data/lib/rubocop/cop/{style → layout}/space_before_block_braces.rb +6 -2
  86. data/lib/rubocop/cop/{style → layout}/space_before_comma.rb +1 -1
  87. data/lib/rubocop/cop/{style → layout}/space_before_comment.rb +1 -1
  88. data/lib/rubocop/cop/{style → layout}/space_before_first_arg.rb +4 -2
  89. data/lib/rubocop/cop/{style → layout}/space_before_semicolon.rb +1 -1
  90. data/lib/rubocop/cop/{style → layout}/space_in_lambda_literal.rb +1 -1
  91. data/lib/rubocop/cop/{style → layout}/space_inside_array_percent_literal.rb +1 -1
  92. data/lib/rubocop/cop/{style → layout}/space_inside_block_braces.rb +3 -4
  93. data/lib/rubocop/cop/{style → layout}/space_inside_brackets.rb +1 -1
  94. data/lib/rubocop/cop/{style → layout}/space_inside_hash_literal_braces.rb +1 -1
  95. data/lib/rubocop/cop/{style → layout}/space_inside_parens.rb +1 -1
  96. data/lib/rubocop/cop/{style → layout}/space_inside_percent_literal_delimiters.rb +8 -7
  97. data/lib/rubocop/cop/{style → layout}/space_inside_range_literal.rb +1 -1
  98. data/lib/rubocop/cop/{style → layout}/space_inside_string_interpolation.rb +1 -1
  99. data/lib/rubocop/cop/{style → layout}/tab.rb +1 -1
  100. data/lib/rubocop/cop/{style → layout}/trailing_blank_lines.rb +1 -1
  101. data/lib/rubocop/cop/{style → layout}/trailing_whitespace.rb +2 -2
  102. data/lib/rubocop/cop/lint/ambiguous_block_association.rb +1 -1
  103. data/lib/rubocop/cop/lint/ambiguous_operator.rb +4 -4
  104. data/lib/rubocop/cop/lint/debugger.rb +0 -15
  105. data/lib/rubocop/cop/lint/duplicate_methods.rb +2 -1
  106. data/lib/rubocop/cop/lint/rescue_type.rb +81 -0
  107. data/lib/rubocop/cop/lint/script_permission.rb +42 -0
  108. data/lib/rubocop/cop/lint/useless_access_modifier.rb +1 -1
  109. data/lib/rubocop/cop/message_annotator.rb +23 -13
  110. data/lib/rubocop/cop/metrics/block_length.rb +1 -1
  111. data/lib/rubocop/cop/mixin/array_min_size.rb +59 -0
  112. data/lib/rubocop/cop/mixin/configurable_enforced_style.rb +10 -11
  113. data/lib/rubocop/cop/mixin/def_node.rb +1 -1
  114. data/lib/rubocop/cop/mixin/empty_lines_around_body.rb +1 -1
  115. data/lib/rubocop/cop/mixin/enforce_superclass.rb +36 -0
  116. data/lib/rubocop/cop/mixin/hash_alignment.rb +1 -1
  117. data/lib/rubocop/cop/mixin/multiline_expression_indentation.rb +7 -3
  118. data/lib/rubocop/cop/mixin/space_before_punctuation.rb +1 -1
  119. data/lib/rubocop/cop/performance/caller.rb +41 -0
  120. data/lib/rubocop/cop/performance/compare_with_block.rb +60 -14
  121. data/lib/rubocop/cop/performance/double_start_end_with.rb +2 -2
  122. data/lib/rubocop/cop/performance/redundant_merge.rb +2 -0
  123. data/lib/rubocop/cop/rails/action_filter.rb +1 -3
  124. data/lib/rubocop/cop/rails/application_job.rb +32 -0
  125. data/lib/rubocop/cop/rails/application_record.rb +32 -0
  126. data/lib/rubocop/cop/rails/blank.rb +9 -3
  127. data/lib/rubocop/cop/rails/output_safety.rb +59 -15
  128. data/lib/rubocop/cop/rails/present.rb +9 -3
  129. data/lib/rubocop/cop/rails/relative_date_constant.rb +35 -4
  130. data/lib/rubocop/cop/rails/reversible_migration.rb +82 -18
  131. data/lib/rubocop/cop/rails/save_bang.rb +7 -2
  132. data/lib/rubocop/cop/rails/skips_model_validations.rb +7 -0
  133. data/lib/rubocop/cop/registry.rb +4 -3
  134. data/lib/rubocop/cop/security/eval.rb +9 -3
  135. data/lib/rubocop/cop/style/and_or.rb +1 -1
  136. data/lib/rubocop/cop/style/block_delimiters.rb +11 -17
  137. data/lib/rubocop/cop/style/braces_around_hash_parameters.rb +1 -1
  138. data/lib/rubocop/cop/style/collection_methods.rb +1 -3
  139. data/lib/rubocop/cop/style/conditional_assignment.rb +1 -1
  140. data/lib/rubocop/cop/style/copyright.rb +2 -2
  141. data/lib/rubocop/cop/style/documentation_method.rb +1 -1
  142. data/lib/rubocop/cop/style/each_for_simple_loop.rb +2 -1
  143. data/lib/rubocop/cop/style/each_with_object.rb +10 -6
  144. data/lib/rubocop/cop/style/empty_case_condition.rb +2 -2
  145. data/lib/rubocop/cop/style/for.rb +4 -5
  146. data/lib/rubocop/cop/style/format_string.rb +49 -0
  147. data/lib/rubocop/cop/style/format_string_token.rb +141 -0
  148. data/lib/rubocop/cop/style/hash_syntax.rb +1 -1
  149. data/lib/rubocop/cop/style/identical_conditional_branches.rb +2 -2
  150. data/lib/rubocop/cop/style/if_unless_modifier_of_if_unless.rb +1 -1
  151. data/lib/rubocop/cop/style/inverse_methods.rb +10 -1
  152. data/lib/rubocop/cop/style/lambda.rb +9 -9
  153. data/lib/rubocop/cop/style/line_end_concatenation.rb +4 -0
  154. data/lib/rubocop/cop/style/method_call_with_args_parentheses.rb +3 -3
  155. data/lib/rubocop/cop/style/method_called_on_do_end_block.rb +1 -2
  156. data/lib/rubocop/cop/style/method_name.rb +8 -2
  157. data/lib/rubocop/cop/style/mixin_grouping.rb +41 -3
  158. data/lib/rubocop/cop/style/multiline_block_chain.rb +7 -11
  159. data/lib/rubocop/cop/style/multiple_comparison.rb +77 -0
  160. data/lib/rubocop/cop/style/next.rb +11 -22
  161. data/lib/rubocop/cop/style/parallel_assignment.rb +10 -19
  162. data/lib/rubocop/cop/style/percent_literal_delimiters.rb +2 -2
  163. data/lib/rubocop/cop/style/self_assignment.rb +4 -0
  164. data/lib/rubocop/cop/style/single_line_block_params.rb +23 -17
  165. data/lib/rubocop/cop/style/symbol_array.rb +24 -13
  166. data/lib/rubocop/cop/style/symbol_proc.rb +4 -0
  167. data/lib/rubocop/cop/style/ternary_parentheses.rb +1 -1
  168. data/lib/rubocop/cop/style/unneeded_interpolation.rb +4 -0
  169. data/lib/rubocop/cop/style/word_array.rb +33 -53
  170. data/lib/rubocop/cop/style/yoda_condition.rb +78 -0
  171. data/lib/rubocop/cop/team.rb +1 -14
  172. data/lib/rubocop/cop/util.rb +16 -0
  173. data/lib/rubocop/formatter/simple_text_formatter.rb +0 -11
  174. data/lib/rubocop/node_pattern.rb +52 -52
  175. data/lib/rubocop/options.rb +25 -0
  176. data/lib/rubocop/path_util.rb +17 -1
  177. data/lib/rubocop/result_cache.rb +8 -7
  178. data/lib/rubocop/rspec/expect_offense.rb +167 -0
  179. data/lib/rubocop/rspec/shared_examples.rb +0 -8
  180. data/lib/rubocop/rspec/support.rb +1 -0
  181. data/lib/rubocop/runner.rb +12 -2
  182. data/lib/rubocop/target_finder.rb +5 -0
  183. data/lib/rubocop/version.rb +1 -1
  184. metadata +101 -72
@@ -1,5 +1,34 @@
1
1
  # These are all the cops that are disabled in the default configuration.
2
2
 
3
+ Layout/FirstArrayElementLineBreak:
4
+ Description: >-
5
+ Checks for a line break before the first element in a
6
+ multi-line array.
7
+ Enabled: false
8
+
9
+ Layout/FirstHashElementLineBreak:
10
+ Description: >-
11
+ Checks for a line break before the first element in a
12
+ multi-line hash.
13
+ Enabled: false
14
+
15
+ Layout/FirstMethodArgumentLineBreak:
16
+ Description: >-
17
+ Checks for a line break before the first argument in a
18
+ multi-line method call.
19
+ Enabled: false
20
+
21
+ Layout/FirstMethodParameterLineBreak:
22
+ Description: >-
23
+ Checks for a line break before the first parameter in a
24
+ multi-line method parameter definition.
25
+ Enabled: false
26
+
27
+ Layout/MultilineAssignmentLayout:
28
+ Description: 'Check for a newline after the assignment operator in multi-line assignments.'
29
+ StyleGuide: '#indent-conditional-assignment'
30
+ Enabled: false
31
+
3
32
  # By default, the rails cops are not run. Override in project or home
4
33
  # directory .rubocop.yml files, or by giving the -R/--rails option.
5
34
  Rails:
@@ -35,30 +64,6 @@ Style/Encoding:
35
64
  StyleGuide: '#utf-8'
36
65
  Enabled: false
37
66
 
38
- Style/FirstArrayElementLineBreak:
39
- Description: >-
40
- Checks for a line break before the first element in a
41
- multi-line array.
42
- Enabled: false
43
-
44
- Style/FirstHashElementLineBreak:
45
- Description: >-
46
- Checks for a line break before the first element in a
47
- multi-line hash.
48
- Enabled: false
49
-
50
- Style/FirstMethodArgumentLineBreak:
51
- Description: >-
52
- Checks for a line break before the first argument in a
53
- multi-line method call.
54
- Enabled: false
55
-
56
- Style/FirstMethodParameterLineBreak:
57
- Description: >-
58
- Checks for a line break before the first parameter in a
59
- multi-line method parameter definition.
60
- Enabled: false
61
-
62
67
  Style/ImplicitRuntimeError:
63
68
  Description: >-
64
69
  Use `raise` or `fail` with an explicit exception class and
@@ -96,11 +101,6 @@ Style/MissingElse:
96
101
  - case
97
102
  - both
98
103
 
99
- Style/MultilineAssignmentLayout:
100
- Description: 'Check for a newline after the assignment operator in multi-line assignments.'
101
- StyleGuide: '#indent-conditional-assignment'
102
- Enabled: false
103
-
104
104
  Style/OptionHash:
105
105
  Description: "Don't use option hashes when you can use keyword arguments."
106
106
  Enabled: false
@@ -1,40 +1,355 @@
1
1
  # These are all the cops that are enabled in the default configuration.
2
2
 
3
- Style/AccessModifierIndentation:
3
+ #################### Layout ###############################
4
+
5
+ Layout/AccessModifierIndentation:
4
6
  Description: Check indentation of private/protected visibility modifiers.
5
7
  StyleGuide: '#indent-public-private-protected'
6
8
  Enabled: true
7
9
 
8
- Style/AccessorMethodName:
9
- Description: Check the naming of accessor methods for get_/set_.
10
- StyleGuide: '#accessor_mutator_method_names'
11
- Enabled: true
12
-
13
- Style/Alias:
14
- Description: 'Use alias instead of alias_method.'
15
- StyleGuide: '#alias-method'
16
- Enabled: true
17
-
18
- Style/AlignArray:
10
+ Layout/AlignArray:
19
11
  Description: >-
20
12
  Align the elements of an array literal if they span more than
21
13
  one line.
22
14
  StyleGuide: '#align-multiline-arrays'
23
15
  Enabled: true
24
16
 
25
- Style/AlignHash:
17
+ Layout/AlignHash:
26
18
  Description: >-
27
19
  Align the elements of a hash literal if they span more than
28
20
  one line.
29
21
  Enabled: true
30
22
 
31
- Style/AlignParameters:
23
+ Layout/AlignParameters:
32
24
  Description: >-
33
25
  Align the parameters of a method call if they span more
34
26
  than one line.
35
27
  StyleGuide: '#no-double-indent'
36
28
  Enabled: true
37
29
 
30
+ Layout/BlockEndNewline:
31
+ Description: 'Put end statement of multiline block on its own line.'
32
+ Enabled: true
33
+
34
+ Layout/CaseIndentation:
35
+ Description: 'Indentation of when in a case/when/[else/]end.'
36
+ StyleGuide: '#indent-when-to-case'
37
+ Enabled: true
38
+
39
+ Layout/ClosingParenthesisIndentation:
40
+ Description: 'Checks the indentation of hanging closing parentheses.'
41
+ Enabled: true
42
+
43
+ Layout/CommentIndentation:
44
+ Description: 'Indentation of comments.'
45
+ Enabled: true
46
+
47
+ Layout/DotPosition:
48
+ Description: 'Checks the position of the dot in multi-line method calls.'
49
+ StyleGuide: '#consistent-multi-line-chains'
50
+ Enabled: true
51
+
52
+ Layout/ElseAlignment:
53
+ Description: 'Align elses and elsifs correctly.'
54
+ Enabled: true
55
+
56
+ Layout/EmptyLineBetweenDefs:
57
+ Description: 'Use empty lines between defs.'
58
+ StyleGuide: '#empty-lines-between-methods'
59
+ Enabled: true
60
+
61
+ Layout/EmptyLines:
62
+ Description: "Don't use several empty lines in a row."
63
+ StyleGuide: '#two-or-more-empty-lines'
64
+ Enabled: true
65
+
66
+ Layout/EmptyLinesAroundAccessModifier:
67
+ Description: "Keep blank lines around access modifiers."
68
+ StyleGuide: '#empty-lines-around-access-modifier'
69
+ Enabled: true
70
+
71
+ Layout/EmptyLinesAroundBeginBody:
72
+ Description: "Keeps track of empty lines around begin-end bodies."
73
+ StyleGuide: '#empty-lines-around-bodies'
74
+ Enabled: true
75
+
76
+ Layout/EmptyLinesAroundBlockBody:
77
+ Description: "Keeps track of empty lines around block bodies."
78
+ StyleGuide: '#empty-lines-around-bodies'
79
+ Enabled: true
80
+
81
+ Layout/EmptyLinesAroundClassBody:
82
+ Description: "Keeps track of empty lines around class bodies."
83
+ StyleGuide: '#empty-lines-around-bodies'
84
+ Enabled: true
85
+
86
+ Layout/EmptyLinesAroundExceptionHandlingKeywords:
87
+ Description: "Keeps track of empty lines around exception handling keywords."
88
+ StyleGuide: '#empty-lines-around-bodies'
89
+ Enabled: true
90
+
91
+ Layout/EmptyLinesAroundModuleBody:
92
+ Description: "Keeps track of empty lines around module bodies."
93
+ StyleGuide: '#empty-lines-around-bodies'
94
+ Enabled: true
95
+
96
+ Layout/EmptyLinesAroundMethodBody:
97
+ Description: "Keeps track of empty lines around method bodies."
98
+ StyleGuide: '#empty-lines-around-bodies'
99
+ Enabled: true
100
+
101
+ Layout/EndOfLine:
102
+ Description: 'Use Unix-style line endings.'
103
+ StyleGuide: '#crlf'
104
+ Enabled: true
105
+
106
+ Layout/ExtraSpacing:
107
+ Description: 'Do not use unnecessary spacing.'
108
+ Enabled: true
109
+
110
+ Layout/InitialIndentation:
111
+ Description: >-
112
+ Checks the indentation of the first non-blank non-comment line in a file.
113
+ Enabled: true
114
+
115
+ Layout/FirstParameterIndentation:
116
+ Description: 'Checks the indentation of the first parameter in a method call.'
117
+ Enabled: true
118
+
119
+ Layout/IndentationConsistency:
120
+ Description: 'Keep indentation straight.'
121
+ StyleGuide: '#spaces-indentation'
122
+ Enabled: true
123
+
124
+ Layout/IndentationWidth:
125
+ Description: 'Use 2 spaces for indentation.'
126
+ StyleGuide: '#spaces-indentation'
127
+ Enabled: true
128
+
129
+ Layout/IndentArray:
130
+ Description: >-
131
+ Checks the indentation of the first element in an array
132
+ literal.
133
+ Enabled: true
134
+
135
+ Layout/IndentAssignment:
136
+ Description: >-
137
+ Checks the indentation of the first line of the
138
+ right-hand-side of a multi-line assignment.
139
+ Enabled: true
140
+
141
+ Layout/IndentHash:
142
+ Description: 'Checks the indentation of the first key in a hash literal.'
143
+ Enabled: true
144
+
145
+ Layout/IndentHeredoc:
146
+ Description: 'This cops checks the indentation of the here document bodies.'
147
+ StyleGuide: '#squiggly-heredocs'
148
+ Enabled: true
149
+
150
+ Layout/SpaceInLambdaLiteral:
151
+ Description: 'Checks for spaces in lambda literals.'
152
+ Enabled: true
153
+
154
+ Layout/LeadingCommentSpace:
155
+ Description: 'Comments should start with a space.'
156
+ StyleGuide: '#hash-space'
157
+ Enabled: true
158
+
159
+ Layout/MultilineArrayBraceLayout:
160
+ Description: >-
161
+ Checks that the closing brace in an array literal is
162
+ either on the same line as the last array element, or
163
+ a new line.
164
+ Enabled: true
165
+
166
+ Layout/MultilineBlockLayout:
167
+ Description: 'Ensures newlines after multiline block do statements.'
168
+ Enabled: true
169
+
170
+ Layout/MultilineHashBraceLayout:
171
+ Description: >-
172
+ Checks that the closing brace in a hash literal is
173
+ either on the same line as the last hash element, or
174
+ a new line.
175
+ Enabled: true
176
+
177
+ Layout/MultilineMethodCallBraceLayout:
178
+ Description: >-
179
+ Checks that the closing brace in a method call is
180
+ either on the same line as the last method argument, or
181
+ a new line.
182
+ Enabled: true
183
+
184
+ Layout/MultilineMethodCallIndentation:
185
+ Description: >-
186
+ Checks indentation of method calls with the dot operator
187
+ that span more than one line.
188
+ Enabled: true
189
+
190
+ Layout/MultilineMethodDefinitionBraceLayout:
191
+ Description: >-
192
+ Checks that the closing brace in a method definition is
193
+ either on the same line as the last method parameter, or
194
+ a new line.
195
+ Enabled: true
196
+
197
+ Layout/MultilineOperationIndentation:
198
+ Description: >-
199
+ Checks indentation of binary operations that span more than
200
+ one line.
201
+ Enabled: true
202
+
203
+ Layout/EmptyLineAfterMagicComment:
204
+ Description: 'Add an empty line after magic comments to separate them from code.'
205
+ StyleGuide: '#separate-magic-comments-from-code'
206
+ Enabled: true
207
+
208
+ Layout/RescueEnsureAlignment:
209
+ Description: 'Align rescues and ensures correctly.'
210
+ Enabled: true
211
+
212
+ Layout/SpaceBeforeFirstArg:
213
+ Description: >-
214
+ Checks that exactly one space is used between a method name
215
+ and the first argument for method calls without parentheses.
216
+ Enabled: true
217
+
218
+ Layout/SpaceAfterColon:
219
+ Description: 'Use spaces after colons.'
220
+ StyleGuide: '#spaces-operators'
221
+ Enabled: true
222
+
223
+ Layout/SpaceAfterComma:
224
+ Description: 'Use spaces after commas.'
225
+ StyleGuide: '#spaces-operators'
226
+ Enabled: true
227
+
228
+ Layout/SpaceAfterMethodName:
229
+ Description: >-
230
+ Do not put a space between a method name and the opening
231
+ parenthesis in a method definition.
232
+ StyleGuide: '#parens-no-spaces'
233
+ Enabled: true
234
+
235
+ Layout/SpaceAfterNot:
236
+ Description: Tracks redundant space after the ! operator.
237
+ StyleGuide: '#no-space-bang'
238
+ Enabled: true
239
+
240
+ Layout/SpaceAfterSemicolon:
241
+ Description: 'Use spaces after semicolons.'
242
+ StyleGuide: '#spaces-operators'
243
+ Enabled: true
244
+
245
+ Layout/SpaceBeforeBlockBraces:
246
+ Description: >-
247
+ Checks that the left block brace has or doesn't have space
248
+ before it.
249
+ Enabled: true
250
+
251
+ Layout/SpaceBeforeComma:
252
+ Description: 'No spaces before commas.'
253
+ Enabled: true
254
+
255
+ Layout/SpaceBeforeComment:
256
+ Description: >-
257
+ Checks for missing space between code and a comment on the
258
+ same line.
259
+ Enabled: true
260
+
261
+ Layout/SpaceBeforeSemicolon:
262
+ Description: 'No spaces before semicolons.'
263
+ Enabled: true
264
+
265
+ Layout/SpaceInsideBlockBraces:
266
+ Description: >-
267
+ Checks that block braces have or don't have surrounding space.
268
+ For blocks taking parameters, checks that the left brace has
269
+ or doesn't have trailing space.
270
+ Enabled: true
271
+
272
+ Layout/SpaceAroundBlockParameters:
273
+ Description: 'Checks the spacing inside and after block parameters pipes.'
274
+ Enabled: true
275
+
276
+ Layout/SpaceAroundEqualsInParameterDefault:
277
+ Description: >-
278
+ Checks that the equals signs in parameter default assignments
279
+ have or don't have surrounding space depending on
280
+ configuration.
281
+ StyleGuide: '#spaces-around-equals'
282
+ Enabled: true
283
+
284
+ Layout/SpaceAroundKeyword:
285
+ Description: 'Use a space around keywords if appropriate.'
286
+ Enabled: true
287
+
288
+ Layout/SpaceAroundOperators:
289
+ Description: 'Use a single space around operators.'
290
+ StyleGuide: '#spaces-operators'
291
+ Enabled: true
292
+
293
+ Layout/SpaceInsideArrayPercentLiteral:
294
+ Description: 'No unnecessary additional spaces between elements in %i/%w literals.'
295
+ Enabled: true
296
+
297
+ Layout/SpaceInsidePercentLiteralDelimiters:
298
+ Description: 'No unnecessary spaces inside delimiters of %i/%w/%x literals.'
299
+ Enabled: true
300
+
301
+ Layout/SpaceInsideBrackets:
302
+ Description: 'No spaces after [ or before ].'
303
+ StyleGuide: '#no-spaces-braces'
304
+ Enabled: true
305
+
306
+ Layout/SpaceInsideHashLiteralBraces:
307
+ Description: "Use spaces inside hash literal braces - or don't."
308
+ StyleGuide: '#spaces-operators'
309
+ Enabled: true
310
+
311
+ Layout/SpaceInsideParens:
312
+ Description: 'No spaces after ( or before ).'
313
+ StyleGuide: '#no-spaces-braces'
314
+ Enabled: true
315
+
316
+ Layout/SpaceInsideRangeLiteral:
317
+ Description: 'No spaces inside range literals.'
318
+ StyleGuide: '#no-space-inside-range-literals'
319
+ Enabled: true
320
+
321
+ Layout/SpaceInsideStringInterpolation:
322
+ Description: 'Checks for padding/surrounding spaces inside string interpolation.'
323
+ StyleGuide: '#string-interpolation'
324
+ Enabled: true
325
+
326
+ Layout/Tab:
327
+ Description: 'No hard tabs.'
328
+ StyleGuide: '#spaces-indentation'
329
+ Enabled: true
330
+
331
+ Layout/TrailingBlankLines:
332
+ Description: 'Checks trailing blank lines and final newline.'
333
+ StyleGuide: '#newline-eof'
334
+ Enabled: true
335
+
336
+ Layout/TrailingWhitespace:
337
+ Description: 'Avoid trailing whitespace.'
338
+ StyleGuide: '#no-trailing-whitespace'
339
+ Enabled: true
340
+
341
+ #################### Style ###############################
342
+
343
+ Style/AccessorMethodName:
344
+ Description: Check the naming of accessor methods for get_/set_.
345
+ StyleGuide: '#accessor_mutator_method_names'
346
+ Enabled: true
347
+
348
+ Style/Alias:
349
+ Description: 'Use alias instead of alias_method.'
350
+ StyleGuide: '#alias-method'
351
+ Enabled: true
352
+
38
353
  Style/AndOr:
39
354
  Description: 'Use &&/|| instead of and/or.'
40
355
  StyleGuide: '#no-and-or-or'
@@ -75,10 +390,6 @@ Style/BlockComments:
75
390
  StyleGuide: '#no-block-comments'
76
391
  Enabled: true
77
392
 
78
- Style/BlockEndNewline:
79
- Description: 'Put end statement of multiline block on its own line.'
80
- Enabled: true
81
-
82
393
  Style/BlockDelimiters:
83
394
  Description: >-
84
395
  Avoid using {...} for multi-line blocks (multiline chaining is
@@ -96,11 +407,6 @@ Style/CaseEquality:
96
407
  StyleGuide: '#no-case-equality'
97
408
  Enabled: true
98
409
 
99
- Style/CaseIndentation:
100
- Description: 'Indentation of when in a case/when/[else/]end.'
101
- StyleGuide: '#indent-when-to-case'
102
- Enabled: true
103
-
104
410
  Style/CharacterLiteral:
105
411
  Description: 'Checks for uses of character literals.'
106
412
  StyleGuide: '#no-character-literals'
@@ -129,10 +435,6 @@ Style/ClassVars:
129
435
  StyleGuide: '#no-class-vars'
130
436
  Enabled: true
131
437
 
132
- Style/ClosingParenthesisIndentation:
133
- Description: 'Checks the indentation of hanging closing parentheses.'
134
- Enabled: true
135
-
136
438
  Style/ColonMethodCall:
137
439
  Description: 'Do not use :: for method call.'
138
440
  StyleGuide: '#double-colons'
@@ -147,11 +449,7 @@ Style/CommentAnnotation:
147
449
  Description: >-
148
450
  Checks formatting of special comments
149
451
  (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
150
- StyleGuide: '#annotate-keywords'
151
- Enabled: true
152
-
153
- Style/CommentIndentation:
154
- Description: 'Indentation of comments.'
452
+ StyleGuide: '#annotate-keywords'
155
453
  Enabled: true
156
454
 
157
455
  Style/ConditionalAssignment:
@@ -178,11 +476,6 @@ Style/Documentation:
178
476
  - 'spec/**/*'
179
477
  - 'test/**/*'
180
478
 
181
- Style/DotPosition:
182
- Description: 'Checks the position of the dot in multi-line method calls.'
183
- StyleGuide: '#consistent-multi-line-chains'
184
- Enabled: true
185
-
186
479
  Style/DoubleNegation:
187
480
  Description: 'Checks for uses of double negation (!!).'
188
481
  StyleGuide: '#no-bang-bang'
@@ -198,10 +491,6 @@ Style/EachWithObject:
198
491
  Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
199
492
  Enabled: true
200
493
 
201
- Style/ElseAlignment:
202
- Description: 'Align elses and elsifs correctly.'
203
- Enabled: true
204
-
205
494
  Style/EmptyElse:
206
495
  Description: 'Avoid empty else-clauses.'
207
496
  Enabled: true
@@ -210,51 +499,6 @@ Style/EmptyCaseCondition:
210
499
  Description: 'Avoid empty condition in case statements.'
211
500
  Enabled: true
212
501
 
213
- Style/EmptyLineBetweenDefs:
214
- Description: 'Use empty lines between defs.'
215
- StyleGuide: '#empty-lines-between-methods'
216
- Enabled: true
217
-
218
- Style/EmptyLines:
219
- Description: "Don't use several empty lines in a row."
220
- StyleGuide: '#two-or-more-empty-lines'
221
- Enabled: true
222
-
223
- Style/EmptyLinesAroundAccessModifier:
224
- Description: "Keep blank lines around access modifiers."
225
- StyleGuide: '#empty-lines-around-access-modifier'
226
- Enabled: true
227
-
228
- Style/EmptyLinesAroundBeginBody:
229
- Description: "Keeps track of empty lines around begin-end bodies."
230
- StyleGuide: '#empty-lines-around-bodies'
231
- Enabled: true
232
-
233
- Style/EmptyLinesAroundBlockBody:
234
- Description: "Keeps track of empty lines around block bodies."
235
- StyleGuide: '#empty-lines-around-bodies'
236
- Enabled: true
237
-
238
- Style/EmptyLinesAroundClassBody:
239
- Description: "Keeps track of empty lines around class bodies."
240
- StyleGuide: '#empty-lines-around-bodies'
241
- Enabled: true
242
-
243
- Style/EmptyLinesAroundExceptionHandlingKeywords:
244
- Description: "Keeps track of empty lines around exception handling keywords."
245
- StyleGuide: '#empty-lines-around-bodies'
246
- Enabled: true
247
-
248
- Style/EmptyLinesAroundModuleBody:
249
- Description: "Keeps track of empty lines around module bodies."
250
- StyleGuide: '#empty-lines-around-bodies'
251
- Enabled: true
252
-
253
- Style/EmptyLinesAroundMethodBody:
254
- Description: "Keeps track of empty lines around method bodies."
255
- StyleGuide: '#empty-lines-around-bodies'
256
- Enabled: true
257
-
258
502
  Style/EmptyLiteral:
259
503
  Description: 'Prefer literals to Array.new/Hash.new/String.new.'
260
504
  StyleGuide: '#literal-array-hash'
@@ -270,20 +514,11 @@ Style/EndBlock:
270
514
  StyleGuide: '#no-END-blocks'
271
515
  Enabled: true
272
516
 
273
- Style/EndOfLine:
274
- Description: 'Use Unix-style line endings.'
275
- StyleGuide: '#crlf'
276
- Enabled: true
277
-
278
517
  Style/EvenOdd:
279
518
  Description: 'Favor the use of Integer#even? && Integer#odd?'
280
519
  StyleGuide: '#predicate-methods'
281
520
  Enabled: true
282
521
 
283
- Style/ExtraSpacing:
284
- Description: 'Do not use unnecessary spacing.'
285
- Enabled: true
286
-
287
522
  Style/FileName:
288
523
  Description: 'Use snake_case for source file names.'
289
524
  StyleGuide: '#snake-case-files'
@@ -295,15 +530,6 @@ Style/FrozenStringLiteralComment:
295
530
  to help transition from Ruby 2.3.0 to Ruby 3.0.
296
531
  Enabled: true
297
532
 
298
- Style/InitialIndentation:
299
- Description: >-
300
- Checks the indentation of the first non-blank non-comment line in a file.
301
- Enabled: true
302
-
303
- Style/FirstParameterIndentation:
304
- Description: 'Checks the indentation of the first parameter in a method call.'
305
- Enabled: true
306
-
307
533
  Style/FlipFlop:
308
534
  Description: 'Checks for flip flops'
309
535
  StyleGuide: '#no-flip-flops'
@@ -319,6 +545,10 @@ Style/FormatString:
319
545
  StyleGuide: '#sprintf'
320
546
  Enabled: true
321
547
 
548
+ Style/FormatStringToken:
549
+ Description: 'Use a consistent style for format string tokens.'
550
+ Enabled: true
551
+
322
552
  Style/GlobalVars:
323
553
  Description: 'Do not introduce global variables.'
324
554
  StyleGuide: '#instance-vars'
@@ -358,16 +588,6 @@ Style/IfWithSemicolon:
358
588
  StyleGuide: '#no-semicolon-ifs'
359
589
  Enabled: true
360
590
 
361
- Style/IndentationConsistency:
362
- Description: 'Keep indentation straight.'
363
- StyleGuide: '#spaces-indentation'
364
- Enabled: true
365
-
366
- Style/IndentationWidth:
367
- Description: 'Use 2 spaces for indentation.'
368
- StyleGuide: '#spaces-indentation'
369
- Enabled: true
370
-
371
591
  Style/IdenticalConditionalBranches:
372
592
  Description: >-
373
593
  Checks that conditional statements do not have an identical
@@ -375,27 +595,6 @@ Style/IdenticalConditionalBranches:
375
595
  out of the conditional.
376
596
  Enabled: true
377
597
 
378
- Style/IndentArray:
379
- Description: >-
380
- Checks the indentation of the first element in an array
381
- literal.
382
- Enabled: true
383
-
384
- Style/IndentAssignment:
385
- Description: >-
386
- Checks the indentation of the first line of the
387
- right-hand-side of a multi-line assignment.
388
- Enabled: true
389
-
390
- Style/IndentHash:
391
- Description: 'Checks the indentation of the first key in a hash literal.'
392
- Enabled: true
393
-
394
- Style/IndentHeredoc:
395
- Description: 'This cops checks the indentation of the here document bodies.'
396
- StyleGuide: '#squiggly-heredocs'
397
- Enabled: true
398
-
399
598
  Style/InfiniteLoop:
400
599
  Description: 'Use Kernel#loop for infinite loops.'
401
600
  StyleGuide: '#infinite-loop'
@@ -412,20 +611,11 @@ Style/Lambda:
412
611
  StyleGuide: '#lambda-multi-line'
413
612
  Enabled: true
414
613
 
415
- Style/SpaceInLambdaLiteral:
416
- Description: 'Checks for spaces in lambda literals.'
417
- Enabled: true
418
-
419
614
  Style/LambdaCall:
420
615
  Description: 'Use lambda.call(...) instead of lambda.(...).'
421
616
  StyleGuide: '#proc-call'
422
617
  Enabled: true
423
618
 
424
- Style/LeadingCommentSpace:
425
- Description: 'Comments should start with a space.'
426
- StyleGuide: '#hash-space'
427
- Enabled: true
428
-
429
619
  Style/LineEndConcatenation:
430
620
  Description: >-
431
621
  Use \ instead of + or << to concatenate two string literals at
@@ -464,29 +654,11 @@ Style/ModuleFunction:
464
654
  StyleGuide: '#module-function'
465
655
  Enabled: true
466
656
 
467
- Style/MultilineArrayBraceLayout:
468
- Description: >-
469
- Checks that the closing brace in an array literal is
470
- either on the same line as the last array element, or
471
- a new line.
472
- Enabled: true
473
-
474
657
  Style/MultilineBlockChain:
475
658
  Description: 'Avoid multi-line chains of blocks.'
476
659
  StyleGuide: '#single-line-blocks'
477
660
  Enabled: true
478
661
 
479
- Style/MultilineBlockLayout:
480
- Description: 'Ensures newlines after multiline block do statements.'
481
- Enabled: true
482
-
483
- Style/MultilineHashBraceLayout:
484
- Description: >-
485
- Checks that the closing brace in a hash literal is
486
- either on the same line as the last hash element, or
487
- a new line.
488
- Enabled: true
489
-
490
662
  Style/MultilineIfThen:
491
663
  Description: 'Do not use then for multi-line if/unless.'
492
664
  StyleGuide: '#no-then'
@@ -501,32 +673,6 @@ Style/MultilineMemoization:
501
673
  Description: 'Wrap multiline memoizations in a `begin` and `end` block.'
502
674
  Enabled: true
503
675
 
504
- Style/MultilineMethodCallBraceLayout:
505
- Description: >-
506
- Checks that the closing brace in a method call is
507
- either on the same line as the last method argument, or
508
- a new line.
509
- Enabled: true
510
-
511
- Style/MultilineMethodCallIndentation:
512
- Description: >-
513
- Checks indentation of method calls with the dot operator
514
- that span more than one line.
515
- Enabled: true
516
-
517
- Style/MultilineMethodDefinitionBraceLayout:
518
- Description: >-
519
- Checks that the closing brace in a method definition is
520
- either on the same line as the last method parameter, or
521
- a new line.
522
- Enabled: true
523
-
524
- Style/MultilineOperationIndentation:
525
- Description: >-
526
- Checks indentation of binary operations that span more than
527
- one line.
528
- Enabled: true
529
-
530
676
  Style/MultilineTernaryOperator:
531
677
  Description: >-
532
678
  Avoid multi-line ?: (the ternary operator);
@@ -534,6 +680,12 @@ Style/MultilineTernaryOperator:
534
680
  StyleGuide: '#no-multiline-ternary'
535
681
  Enabled: true
536
682
 
683
+ Style/MultipleComparison:
684
+ Description: >-
685
+ Avoid comparing a variable with multiple items in a conditional,
686
+ use Array#include? instead.
687
+ Enabled: true
688
+
537
689
  Style/MutableConstant:
538
690
  Description: 'Do not assign mutable objects to constants.'
539
691
  Enabled: true
@@ -566,11 +718,6 @@ Style/NestedTernaryOperator:
566
718
  StyleGuide: '#no-nested-ternary'
567
719
  Enabled: true
568
720
 
569
- Style/EmptyLineAfterMagicComment:
570
- Description: 'Add an empty line after magic comments to separate them from code.'
571
- StyleGuide: '#separate-magic-comments-from-code'
572
- Enabled: true
573
-
574
721
  Style/Next:
575
722
  Description: 'Use `next` to skip iteration instead of a condition at the end.'
576
723
  StyleGuide: '#no-nested-conditionals'
@@ -715,10 +862,6 @@ Style/RegexpLiteral:
715
862
  StyleGuide: '#percent-r'
716
863
  Enabled: true
717
864
 
718
- Style/RescueEnsureAlignment:
719
- Description: 'Align rescues and ensures correctly.'
720
- Enabled: true
721
-
722
865
  Style/RescueModifier:
723
866
  Description: 'Avoid using rescue in its modifier form.'
724
867
  StyleGuide: '#no-rescue-modifiers'
@@ -753,120 +896,6 @@ Style/SingleLineMethods:
753
896
  StyleGuide: '#no-single-line-methods'
754
897
  Enabled: true
755
898
 
756
- Style/SpaceBeforeFirstArg:
757
- Description: >-
758
- Checks that exactly one space is used between a method name
759
- and the first argument for method calls without parentheses.
760
- Enabled: true
761
-
762
- Style/SpaceAfterColon:
763
- Description: 'Use spaces after colons.'
764
- StyleGuide: '#spaces-operators'
765
- Enabled: true
766
-
767
- Style/SpaceAfterComma:
768
- Description: 'Use spaces after commas.'
769
- StyleGuide: '#spaces-operators'
770
- Enabled: true
771
-
772
- Style/SpaceAfterMethodName:
773
- Description: >-
774
- Do not put a space between a method name and the opening
775
- parenthesis in a method definition.
776
- StyleGuide: '#parens-no-spaces'
777
- Enabled: true
778
-
779
- Style/SpaceAfterNot:
780
- Description: Tracks redundant space after the ! operator.
781
- StyleGuide: '#no-space-bang'
782
- Enabled: true
783
-
784
- Style/SpaceAfterSemicolon:
785
- Description: 'Use spaces after semicolons.'
786
- StyleGuide: '#spaces-operators'
787
- Enabled: true
788
-
789
- Style/SpaceBeforeBlockBraces:
790
- Description: >-
791
- Checks that the left block brace has or doesn't have space
792
- before it.
793
- Enabled: true
794
-
795
- Style/SpaceBeforeComma:
796
- Description: 'No spaces before commas.'
797
- Enabled: true
798
-
799
- Style/SpaceBeforeComment:
800
- Description: >-
801
- Checks for missing space between code and a comment on the
802
- same line.
803
- Enabled: true
804
-
805
- Style/SpaceBeforeSemicolon:
806
- Description: 'No spaces before semicolons.'
807
- Enabled: true
808
-
809
- Style/SpaceInsideBlockBraces:
810
- Description: >-
811
- Checks that block braces have or don't have surrounding space.
812
- For blocks taking parameters, checks that the left brace has
813
- or doesn't have trailing space.
814
- Enabled: true
815
-
816
- Style/SpaceAroundBlockParameters:
817
- Description: 'Checks the spacing inside and after block parameters pipes.'
818
- Enabled: true
819
-
820
- Style/SpaceAroundEqualsInParameterDefault:
821
- Description: >-
822
- Checks that the equals signs in parameter default assignments
823
- have or don't have surrounding space depending on
824
- configuration.
825
- StyleGuide: '#spaces-around-equals'
826
- Enabled: true
827
-
828
- Style/SpaceAroundKeyword:
829
- Description: 'Use a space around keywords if appropriate.'
830
- Enabled: true
831
-
832
- Style/SpaceAroundOperators:
833
- Description: 'Use a single space around operators.'
834
- StyleGuide: '#spaces-operators'
835
- Enabled: true
836
-
837
- Style/SpaceInsideArrayPercentLiteral:
838
- Description: 'No unnecessary additional spaces between elements in %i/%w literals.'
839
- Enabled: true
840
-
841
- Style/SpaceInsidePercentLiteralDelimiters:
842
- Description: 'No unnecessary spaces inside delimiters of %i/%w/%x literals.'
843
- Enabled: true
844
-
845
- Style/SpaceInsideBrackets:
846
- Description: 'No spaces after [ or before ].'
847
- StyleGuide: '#no-spaces-braces'
848
- Enabled: true
849
-
850
- Style/SpaceInsideHashLiteralBraces:
851
- Description: "Use spaces inside hash literal braces - or don't."
852
- StyleGuide: '#spaces-operators'
853
- Enabled: true
854
-
855
- Style/SpaceInsideParens:
856
- Description: 'No spaces after ( or before ).'
857
- StyleGuide: '#no-spaces-braces'
858
- Enabled: true
859
-
860
- Style/SpaceInsideRangeLiteral:
861
- Description: 'No spaces inside range literals.'
862
- StyleGuide: '#no-space-inside-range-literals'
863
- Enabled: true
864
-
865
- Style/SpaceInsideStringInterpolation:
866
- Description: 'Checks for padding/surrounding spaces inside string interpolation.'
867
- StyleGuide: '#string-interpolation'
868
- Enabled: true
869
-
870
899
  Style/SpecialGlobalVars:
871
900
  Description: 'Avoid Perl-style global variables.'
872
901
  StyleGuide: '#no-cryptic-perlisms'
@@ -906,20 +935,10 @@ Style/SymbolProc:
906
935
  Description: 'Use symbols as procs instead of blocks when possible.'
907
936
  Enabled: true
908
937
 
909
- Style/Tab:
910
- Description: 'No hard tabs.'
911
- StyleGuide: '#spaces-indentation'
912
- Enabled: true
913
-
914
938
  Style/TernaryParentheses:
915
939
  Description: 'Checks for use of parentheses around ternary conditions.'
916
940
  Enabled: true
917
941
 
918
- Style/TrailingBlankLines:
919
- Description: 'Checks trailing blank lines and final newline.'
920
- StyleGuide: '#newline-eof'
921
- Enabled: true
922
-
923
942
  Style/TrailingCommaInArguments:
924
943
  Description: 'Checks for trailing comma in argument lists.'
925
944
  StyleGuide: '#no-trailing-params-comma'
@@ -930,11 +949,6 @@ Style/TrailingCommaInLiteral:
930
949
  StyleGuide: '#no-trailing-array-commas'
931
950
  Enabled: true
932
951
 
933
- Style/TrailingWhitespace:
934
- Description: 'Avoid trailing whitespace.'
935
- StyleGuide: '#no-trailing-whitespace'
936
- Enabled: true
937
-
938
952
  Style/TrivialAccessors:
939
953
  Description: 'Prefer attr_* methods to trivial readers/writers.'
940
954
  StyleGuide: '#attr_family'
@@ -1005,6 +1019,11 @@ Style/WordArray:
1005
1019
  StyleGuide: '#percent-w'
1006
1020
  Enabled: true
1007
1021
 
1022
+ Style/YodaCondition:
1023
+ Description: 'Do not use literals as the first operand of a comparison.'
1024
+ Reference: 'https://en.wikipedia.org/wiki/Yoda_conditions'
1025
+ Enabled: true
1026
+
1008
1027
  Style/ZeroLengthPredicate:
1009
1028
  Description: 'Use #empty? when testing for objects of length 0.'
1010
1029
  Enabled: true
@@ -1272,10 +1291,18 @@ Lint/RescueException:
1272
1291
  StyleGuide: '#no-blind-rescues'
1273
1292
  Enabled: true
1274
1293
 
1294
+ Lint/RescueType:
1295
+ Description: 'Avoid rescuing from non constants that could result in a `TypeError`.'
1296
+ Enabled: true
1297
+
1275
1298
  Lint/SafeNavigationChain:
1276
1299
  Description: 'Do not chain ordinary method call after safe navigation operator.'
1277
1300
  Enabled: true
1278
1301
 
1302
+ Lint/ScriptPermission:
1303
+ Description: 'Grant script file execute permission.'
1304
+ Enabled: true
1305
+
1279
1306
  Lint/ShadowedException:
1280
1307
  Description: >-
1281
1308
  Avoid rescuing a higher level exception
@@ -1355,6 +1382,11 @@ Lint/Void:
1355
1382
 
1356
1383
  #################### Performance ###########################
1357
1384
 
1385
+ Performance/Caller:
1386
+ Description: >-
1387
+ Use `caller(n..n)` instead of `caller`.
1388
+ Enabled: true
1389
+
1358
1390
  Performance/Casecmp:
1359
1391
  Description: >-
1360
1392
  Use `casecmp` rather than `downcase ==`, `upcase ==`, `== downcase`, or `== upcase`..
@@ -1516,6 +1548,14 @@ Rails/ActionFilter:
1516
1548
  Description: 'Enforces consistent use of action filter methods.'
1517
1549
  Enabled: true
1518
1550
 
1551
+ Rails/ApplicationJob:
1552
+ Description: 'Check that jobs subclass ApplicationJob.'
1553
+ Enabled: true
1554
+
1555
+ Rails/ApplicationRecord:
1556
+ Description: 'Check that models subclass ApplicationRecord.'
1557
+ Enabled: true
1558
+
1519
1559
  Rails/ActiveSupportAliases:
1520
1560
  Description: >-
1521
1561
  Avoid ActiveSupport aliases of standard ruby methods: