devise_materialize 1.1.1 → 1.2.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.
- checksums.yaml +5 -5
- data/.circleci/config.yml +93 -196
- data/.codeclimate.json +80 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +34 -0
- data/.github/ISSUE_TEMPLATE/feature-request.md +20 -0
- data/.github/ISSUE_TEMPLATE/question.md +10 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +28 -5
- data/.gitignore +1 -0
- data/.mdlrc +5 -0
- data/.rubocop.yml +494 -1354
- data/CHANGELOG.md +20 -10
- data/CODE_OF_CONDUCT.md +4 -7
- data/CONTRIBUTING.md +132 -0
- data/Gemfile +7 -2
- data/README.md +18 -16
- data/_config.yml +1 -1
- data/bin/console +0 -3
- data/bin/publish +68 -0
- data/bin/setup +0 -2
- data/devise_materialize.gemspec +8 -8
- data/lib/devise_materialize/version.rb +1 -1
- data/lib/generators/devise_materialize/install_generator.rb +2 -2
- data/test/devise_materialize_test.rb +5 -0
- data/test/lib/install_generator_test.rb +14 -12
- data/test/test_helper.rb +14 -16
- metadata +19 -14
- data/.codeclimate.yml +0 -45
- data/.github/CONTRIBUTING.md +0 -17
- data/.github/ISSUE_TEMPLATE.md +0 -21
@@ -0,0 +1,20 @@
|
|
1
|
+
---
|
2
|
+
name: Feature Request
|
3
|
+
about: Suggest an idea for this project
|
4
|
+
title: Feature Request
|
5
|
+
labels: enhancement, new
|
6
|
+
assignees: chiefpansancolt
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
**Is your feature request related to a problem? Please describe.**
|
11
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
12
|
+
|
13
|
+
**Describe the solution you'd like**
|
14
|
+
A clear and concise description of what you want to happen.
|
15
|
+
|
16
|
+
**Describe alternatives you've considered**
|
17
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
18
|
+
|
19
|
+
**Additional context**
|
20
|
+
Add any other context or screenshots about the feature request here.
|
@@ -1,9 +1,32 @@
|
|
1
|
-
|
2
|
-
List out Issue Numbers below in a list
|
1
|
+
# Description
|
3
2
|
|
3
|
+
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
|
4
4
|
|
5
|
-
|
6
|
-
List out Issue Numbers below in a list
|
5
|
+
Fixes # (issue)
|
7
6
|
|
7
|
+
## Type of change
|
8
8
|
|
9
|
-
|
9
|
+
Please delete options that are not relevant.
|
10
|
+
|
11
|
+
- [ ] Bug fix (non-breaking change which fixes an issue)
|
12
|
+
- [ ] New feature (non-breaking change which adds functionality)
|
13
|
+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
14
|
+
- [ ] This change requires a documentation update
|
15
|
+
|
16
|
+
## How Has This Been Tested
|
17
|
+
|
18
|
+
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
|
19
|
+
|
20
|
+
- [ ] Test A
|
21
|
+
- [ ] Test B
|
22
|
+
|
23
|
+
## Checklist
|
24
|
+
|
25
|
+
- [ ] My code follows the style guidelines of this project
|
26
|
+
- [ ] I have performed a self-review of my own code
|
27
|
+
- [ ] I have commented my code, particularly in hard-to-understand areas
|
28
|
+
- [ ] I have made corresponding changes to the documentation
|
29
|
+
- [ ] My changes generate no new warnings
|
30
|
+
- [ ] I have added tests that prove my fix is effective or that my feature works
|
31
|
+
- [ ] New and existing unit tests pass locally with my changes
|
32
|
+
- [ ] Any dependent changes have been merged and published in downstream modules
|
data/.gitignore
CHANGED
data/.mdlrc
ADDED
@@ -0,0 +1,5 @@
|
|
1
|
+
rules "MD001", "MD002", "MD003", "MD004", "MD005", "MD006", "MD007", "MD008",
|
2
|
+
"MD009", "MD010", "MD011", "MD012", "MD014", "MD015", "MD016", "MD017",
|
3
|
+
"MD018", "MD019", "MD020", "MD021", "MD022", "MD023", "MD025",
|
4
|
+
"MD026", "MD027", "MD028", "MD030", "MD031", "MD032", "MD034",
|
5
|
+
"MD035", "MD036", "MD037", "MD038", "MD039"
|
data/.rubocop.yml
CHANGED
@@ -1,1747 +1,887 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
- Gemfile.lock
|
5
|
-
- db/schema.rb
|
6
|
-
- node_modules/**/*
|
7
|
-
- simple_form_materialize.gemspec
|
8
|
-
- test/rails_app/**/*
|
9
|
-
- test/tmp/**/*
|
10
|
-
- lib/generators/templates/**/*
|
11
|
-
TargetRubyVersion: 2.2
|
12
|
-
|
13
|
-
# Department Bundler
|
14
|
-
Bundler/DuplicatedGem:
|
15
|
-
Description: Checks for duplicate gem entries in Gemfile.
|
16
|
-
Enabled: true
|
17
|
-
|
18
|
-
Bundler/InsecureProtocolSource:
|
19
|
-
Description: The source `:gemcutter`, `:rubygems` and `:rubyforge` are deprecated because HTTP requests are insecure. Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not.
|
20
|
-
Enabled: true
|
21
|
-
|
22
|
-
Bundler/OrderedGems:
|
23
|
-
Description: Gems within groups in the Gemfile should be alphabetically sorted.
|
24
|
-
Enabled: true
|
25
|
-
|
26
|
-
# Department Gemspec
|
27
|
-
Gemspec/OrderedDependencies:
|
28
|
-
Description: Dependencies in the gemspec should be alphabetically sorted.
|
29
|
-
Enabled: true
|
30
|
-
|
31
|
-
# Department Layout
|
32
|
-
Layout/AccessModifierIndentation:
|
33
|
-
Description: Check indentation of private/protected visibility modifiers.
|
34
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected
|
35
|
-
Enabled: false
|
36
|
-
|
37
|
-
Layout/AlignArray:
|
38
|
-
Description: Align the elements of an array literal if they span more than one line.
|
39
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays
|
40
|
-
Enabled: true
|
41
|
-
|
42
|
-
Layout/AlignHash:
|
43
|
-
Description: Align the elements of a hash literal if they span more than one line.
|
44
|
-
Enabled: true
|
45
|
-
|
46
|
-
Layout/AlignParameters:
|
47
|
-
Description: Align the parameters of a method call if they span more than one line.
|
48
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
|
49
|
-
Enabled: true
|
50
|
-
|
51
|
-
Layout/BlockEndNewline:
|
52
|
-
Description: Put end statement of multiline block on its own line.
|
53
|
-
Enabled: true
|
54
|
-
|
55
|
-
Layout/CaseIndentation:
|
56
|
-
Description: Indentation of when in a case/when/[else/]end.
|
57
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-when-to-case
|
58
|
-
Enabled: true
|
59
|
-
|
60
|
-
Layout/ClosingParenthesisIndentation:
|
61
|
-
Description: Checks the indentation of hanging closing parentheses.
|
62
|
-
Enabled: false
|
63
|
-
|
64
|
-
Layout/CommentIndentation:
|
65
|
-
Description: Indentation of comments.
|
66
|
-
Enabled: false
|
67
|
-
|
68
|
-
Layout/DotPosition:
|
69
|
-
Description: Checks the position of the dot in multi-line method calls.
|
70
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
|
71
|
-
Enabled: true
|
72
|
-
|
73
|
-
Layout/ElseAlignment:
|
74
|
-
Description: Align elses and elsifs correctly.
|
75
|
-
Enabled: true
|
76
|
-
|
77
|
-
Layout/EmptyLineBetweenDefs:
|
78
|
-
Description: Use empty lines between defs.
|
79
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods
|
80
|
-
Enabled: true
|
81
|
-
|
82
|
-
Layout/EmptyLines:
|
83
|
-
Description: Don't use several empty lines in a row.
|
84
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#two-or-more-empty-lines
|
85
|
-
Enabled: true
|
86
|
-
|
87
|
-
Layout/EmptyLinesAroundAccessModifier:
|
88
|
-
Description: Keep blank lines around access modifiers.
|
89
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-around-access-modifier
|
90
|
-
Enabled: false
|
91
|
-
|
92
|
-
Layout/EmptyLinesAroundBeginBody:
|
93
|
-
Description: Keeps track of empty lines around begin-end bodies.
|
94
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-around-bodies
|
95
|
-
Enabled: false
|
96
|
-
|
97
|
-
Layout/EmptyLinesAroundBlockBody:
|
98
|
-
Description: Keeps track of empty lines around block bodies.
|
99
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-around-bodies
|
100
|
-
Enabled: false
|
101
|
-
|
102
|
-
Layout/EmptyLinesAroundClassBody:
|
103
|
-
Description: Keeps track of empty lines around class bodies.
|
104
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-around-bodies
|
105
|
-
Enabled: false
|
106
|
-
|
107
|
-
Layout/EmptyLinesAroundExceptionHandlingKeywords:
|
108
|
-
Description: Keeps track of empty lines around exception handling keywords.
|
109
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-around-bodies
|
110
|
-
Enabled: false
|
111
|
-
|
112
|
-
Layout/EmptyLinesAroundModuleBody:
|
113
|
-
Description: Keeps track of empty lines around module bodies.
|
114
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-around-bodies
|
115
|
-
Enabled: false
|
116
|
-
|
117
|
-
Layout/EmptyLinesAroundMethodBody:
|
118
|
-
Description: Keeps track of empty lines around method bodies.
|
119
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-around-bodies
|
120
|
-
Enabled: false
|
121
|
-
|
122
|
-
Layout/EndOfLine:
|
123
|
-
Description: Use Unix-style line endings.
|
124
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#crlf
|
125
|
-
Enabled: false
|
126
|
-
|
127
|
-
Layout/ExtraSpacing:
|
128
|
-
Description: Do not use unnecessary spacing.
|
129
|
-
Enabled: true
|
130
|
-
|
131
|
-
Layout/FirstArrayElementLineBreak:
|
132
|
-
Description: Checks for a line break before the first element in a multi-line array.
|
133
|
-
Enabled: false
|
134
|
-
|
135
|
-
Layout/FirstHashElementLineBreak:
|
136
|
-
Description: Checks for a line break before the first element in a multi-line hash.
|
137
|
-
Enabled: false
|
138
|
-
|
139
|
-
Layout/FirstMethodArgumentLineBreak:
|
140
|
-
Description: Checks for a line break before the first argument in a multi-line method call.
|
141
|
-
Enabled: false
|
142
|
-
|
143
|
-
Layout/FirstMethodParameterLineBreak:
|
144
|
-
Description: Checks for a line break before the first parameter in a multi-line method parameter definition.
|
145
|
-
Enabled: false
|
146
|
-
|
147
|
-
Layout/InitialIndentation:
|
148
|
-
Description: Checks the indentation of the first non-blank non-comment line in a file.
|
149
|
-
Enabled: false
|
150
|
-
|
151
|
-
Layout/FirstParameterIndentation:
|
152
|
-
Description: Checks the indentation of the first parameter in a method call.
|
153
|
-
Enabled: false
|
154
|
-
|
155
|
-
Layout/IndentationConsistency:
|
156
|
-
Description: Keep indentation straight.
|
157
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
158
|
-
Enabled: false
|
159
|
-
|
160
|
-
Layout/IndentationWidth:
|
161
|
-
Description: Use 2 spaces for indentation.
|
162
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
163
|
-
Enabled: true
|
164
|
-
|
165
|
-
Layout/IndentArray:
|
166
|
-
Description: Checks the indentation of the first element in an array literal.
|
167
|
-
Enabled: false
|
168
|
-
|
169
|
-
Layout/IndentAssignment:
|
170
|
-
Description: Checks the indentation of the first line of the right-hand-side of a multi-line assignment.
|
171
|
-
Enabled: true
|
172
|
-
|
173
|
-
Layout/IndentHash:
|
174
|
-
Description: Checks the indentation of the first key in a hash literal.
|
175
|
-
Enabled: false
|
176
|
-
|
177
|
-
Layout/IndentHeredoc:
|
178
|
-
Description: This cops checks the indentation of the here document bodies.
|
179
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#squiggly-heredocs
|
180
|
-
Enabled: true
|
181
|
-
|
182
|
-
Layout/SpaceInLambdaLiteral:
|
183
|
-
Description: Checks for spaces in lambda literals.
|
184
|
-
Enabled: true
|
185
|
-
|
186
|
-
Layout/LeadingCommentSpace:
|
187
|
-
Description: Comments should start with a space.
|
188
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-space
|
189
|
-
Enabled: true
|
190
|
-
|
191
|
-
Layout/MultilineArrayBraceLayout:
|
192
|
-
Description: Checks that the closing brace in an array literal is either on the same line as the last array element, or a new line.
|
193
|
-
Enabled: true
|
194
|
-
|
195
|
-
Layout/MultilineAssignmentLayout:
|
196
|
-
Description: Check for a newline after the assignment operator in multi-line assignments.
|
197
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guid#indent-conditional-assignment
|
198
|
-
Enabled: false
|
199
|
-
|
200
|
-
Layout/MultilineBlockLayout:
|
201
|
-
Description: Ensures newlines after multiline block do statements.
|
202
|
-
Enabled: true
|
203
|
-
|
204
|
-
Layout/MultilineHashBraceLayout:
|
205
|
-
Description: Checks that the closing brace in a hash literal is either on the same line as the last hash element, or a new line.
|
206
|
-
Enabled: true
|
207
|
-
|
208
|
-
Layout/MultilineMethodCallBraceLayout:
|
209
|
-
Description: Checks that the closing brace in a method call is either on the same line as the last method argument, or a new line.
|
210
|
-
Enabled: true
|
211
|
-
|
212
|
-
Layout/MultilineMethodCallIndentation:
|
213
|
-
Description: Checks indentation of method calls with the dot operator that span more than one line.
|
214
|
-
Enabled: true
|
215
|
-
|
216
|
-
Layout/MultilineMethodDefinitionBraceLayout:
|
217
|
-
Description: Checks that the closing brace in a method definition is either on the same line as the last method parameter, or a new line.
|
218
|
-
Enabled: true
|
219
|
-
|
220
|
-
Layout/MultilineOperationIndentation:
|
221
|
-
Description: Checks indentation of binary operations that span more than one line.
|
222
|
-
Enabled: false
|
223
|
-
|
224
|
-
Layout/EmptyLineAfterMagicComment:
|
225
|
-
Description: Add an empty line after magic comments to separate them from code.
|
226
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#separate-magic-comments-from-code
|
227
|
-
Enabled: true
|
228
|
-
|
229
|
-
Layout/RescueEnsureAlignment:
|
230
|
-
Description: Align rescues and ensures correctly.
|
231
|
-
Enabled: false
|
232
|
-
|
233
|
-
Layout/SpaceBeforeFirstArg:
|
234
|
-
Description: Checks that exactly one space is used between a method name and the first argument for method calls without parentheses.
|
235
|
-
Enabled: true
|
236
|
-
|
237
|
-
Layout/SpaceAfterColon:
|
238
|
-
Description: Use spaces after colons.
|
239
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
240
|
-
Enabled: true
|
241
|
-
|
242
|
-
Layout/SpaceAfterComma:
|
243
|
-
Description: Use spaces after commas.
|
244
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
245
|
-
Enabled: true
|
246
|
-
|
247
|
-
Layout/SpaceAfterMethodName:
|
248
|
-
Description: Do not put a space between a method name and the opening parenthesis in a method definition.
|
249
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
|
250
|
-
Enabled: true
|
251
|
-
|
252
|
-
Layout/SpaceAfterNot:
|
253
|
-
Description: Tracks redundant space after the ! operator.
|
254
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-bang
|
255
|
-
Enabled: false
|
256
|
-
|
257
|
-
Layout/SpaceAfterSemicolon:
|
258
|
-
Description: Use spaces after semicolons.
|
259
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
260
|
-
Enabled: true
|
261
|
-
|
262
|
-
Layout/SpaceBeforeBlockBraces:
|
263
|
-
Description: Checks that the left block brace has or doesn't have space before it.
|
264
|
-
Enabled: false
|
265
|
-
|
266
|
-
Layout/SpaceBeforeComma:
|
267
|
-
Description: No spaces before commas.
|
268
|
-
Enabled: false
|
269
|
-
|
270
|
-
Layout/SpaceBeforeComment:
|
271
|
-
Description: Checks for missing space between code and a comment on the same line.
|
272
|
-
Enabled: false
|
273
|
-
|
274
|
-
Layout/SpaceBeforeSemicolon:
|
275
|
-
Description: No spaces before semicolons.
|
276
|
-
Enabled: false
|
277
|
-
|
278
|
-
Layout/SpaceInsideBlockBraces:
|
279
|
-
Description: Checks that block braces have or don't have surrounding space. For blocks taking parameters, checks that the left brace has or doesn't have trailing space.
|
280
|
-
Enabled: false
|
281
|
-
|
282
|
-
Layout/SpaceAroundBlockParameters:
|
283
|
-
Description: Checks the spacing inside and after block parameters pipes.
|
284
|
-
Enabled: true
|
285
|
-
|
286
|
-
Layout/SpaceAroundEqualsInParameterDefault:
|
287
|
-
Description: Checks that the equals signs in parameter default assignments have or don't have surrounding space depending on configuration.
|
288
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-around-equals
|
289
|
-
Enabled: true
|
290
|
-
|
291
|
-
Layout/SpaceAroundKeyword:
|
292
|
-
Description: Use a space around keywords if appropriate.
|
293
|
-
Enabled: true
|
294
|
-
|
295
|
-
Layout/SpaceAroundOperators:
|
296
|
-
Description: Use a single space around operators.
|
297
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
298
|
-
Enabled: true
|
299
|
-
|
300
|
-
Layout/SpaceInsideArrayPercentLiteral:
|
301
|
-
Description: No unnecessary additional spaces between elements in %i/%w literals.
|
302
|
-
Enabled: true
|
303
|
-
|
304
|
-
Layout/SpaceInsidePercentLiteralDelimiters:
|
305
|
-
Description: No unnecessary spaces inside delimiters of %i/%w/%x literals.
|
306
|
-
Enabled: true
|
307
|
-
|
308
|
-
Layout/SpaceInsideHashLiteralBraces:
|
309
|
-
Description: Use spaces inside hash literal braces - or don't.
|
310
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
311
|
-
Enabled: true
|
312
|
-
|
313
|
-
Layout/SpaceInsideParens:
|
314
|
-
Description: No spaces after ( or before ).
|
315
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
|
316
|
-
Enabled: true
|
317
|
-
|
318
|
-
Layout/SpaceInsideRangeLiteral:
|
319
|
-
Description: No spaces inside range literals.
|
320
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals
|
321
|
-
Enabled: true
|
322
|
-
|
323
|
-
Layout/SpaceInsideStringInterpolation:
|
324
|
-
Description: Checks for padding/surrounding spaces inside string interpolation.
|
325
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#string-interpolation
|
326
|
-
Enabled: false
|
327
|
-
|
328
|
-
Layout/Tab:
|
329
|
-
Description: No hard tabs.
|
330
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
331
|
-
Enabled: false
|
332
|
-
|
333
|
-
Layout/TrailingBlankLines:
|
334
|
-
Description: Checks trailing blank lines and final newline.
|
335
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#newline-eof
|
336
|
-
Enabled: false
|
337
|
-
|
338
|
-
Layout/TrailingWhitespace:
|
339
|
-
Description: Avoid trailing whitespace.
|
340
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace
|
341
|
-
Enabled: false
|
342
|
-
|
343
|
-
# Department Lint
|
344
|
-
Lint/AmbiguousBlockAssociation:
|
345
|
-
Description: Checks for ambiguous block association with method when param passed without parentheses.
|
346
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#syntax
|
347
|
-
Enabled: false
|
348
|
-
|
349
|
-
Lint/AmbiguousOperator:
|
350
|
-
Description: Checks for ambiguous operators in the first argument of a method invocation without parentheses.
|
351
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-invocation-parens
|
352
|
-
Enabled: true
|
353
|
-
|
354
|
-
Lint/AmbiguousRegexpLiteral:
|
355
|
-
Description: Checks for ambiguous regexp literals in the first argument of a method invocation without parentheses.
|
356
|
-
Enabled: true
|
357
|
-
|
358
|
-
Lint/AssignmentInCondition:
|
359
|
-
Description: Don't use assignment in conditions.
|
360
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
|
361
|
-
Enabled: true
|
362
|
-
|
363
|
-
Lint/BlockAlignment:
|
364
|
-
Description: Align block ends correctly.
|
365
|
-
Enabled: true
|
366
|
-
|
367
|
-
Lint/BooleanSymbol:
|
368
|
-
Description: Check for `:true` and `:false` symbols.
|
369
|
-
Enabled: true
|
370
|
-
|
371
|
-
Lint/CircularArgumentReference:
|
372
|
-
Description: Default values in optional keyword arguments and optional ordinal arguments should not refer back to the name of the argument.
|
373
|
-
Enabled: true
|
374
|
-
|
375
|
-
Lint/ConditionPosition:
|
376
|
-
Description: Checks for condition placed in a confusing position relative to the keyword.
|
377
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#same-line-condition
|
378
|
-
Enabled: true
|
379
|
-
|
380
|
-
Lint/Debugger:
|
381
|
-
Description: Check for debugger calls.
|
382
|
-
Enabled: true
|
383
|
-
|
384
|
-
Lint/DefEndAlignment:
|
385
|
-
Description: Align ends corresponding to defs correctly.
|
386
|
-
Enabled: true
|
387
|
-
|
388
|
-
Lint/DeprecatedClassMethods:
|
389
|
-
Description: Check for deprecated class method calls.
|
390
|
-
Enabled: true
|
391
|
-
|
392
|
-
Lint/DuplicateCaseCondition:
|
393
|
-
Description: Do not repeat values in case conditionals.
|
394
|
-
Enabled: true
|
395
|
-
|
396
|
-
Lint/DuplicateMethods:
|
397
|
-
Description: Check for duplicate method definitions.
|
398
|
-
Enabled: true
|
399
|
-
|
400
|
-
Lint/DuplicatedKey:
|
401
|
-
Description: Check for duplicate keys in hash literals.
|
402
|
-
Enabled: true
|
403
|
-
|
404
|
-
Lint/EachWithObjectArgument:
|
405
|
-
Description: Check for immutable argument given to each_with_object.
|
406
|
-
Enabled: true
|
407
|
-
|
408
|
-
Lint/ElseLayout:
|
409
|
-
Description: Check for odd code arrangement in an else block.
|
410
|
-
Enabled: true
|
411
|
-
|
412
|
-
Lint/EmptyEnsure:
|
413
|
-
Description: Checks for empty ensure block.
|
414
|
-
Enabled: true
|
415
|
-
AutoCorrect: false
|
416
|
-
|
417
|
-
Lint/EmptyExpression:
|
418
|
-
Description: Checks for empty expressions.
|
419
|
-
Enabled: true
|
420
|
-
|
421
|
-
Lint/EmptyInterpolation:
|
422
|
-
Description: Checks for empty string interpolation.
|
423
|
-
Enabled: true
|
424
|
-
|
425
|
-
Lint/EmptyWhen:
|
426
|
-
Description: Checks for `when` branches with empty bodies.
|
427
|
-
Enabled: true
|
428
|
-
|
429
|
-
Lint/EndAlignment:
|
430
|
-
Description: Align ends correctly.
|
431
|
-
Enabled: true
|
432
|
-
|
433
|
-
Lint/EndInMethod:
|
434
|
-
Description: END blocks should not be placed inside method definitions.
|
435
|
-
Enabled: true
|
436
|
-
|
437
|
-
Lint/EnsureReturn:
|
438
|
-
Description: Do not use return in an ensure block.
|
439
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-return-ensure
|
440
|
-
Enabled: true
|
441
|
-
|
442
|
-
Lint/FloatOutOfRange:
|
443
|
-
Description: Catches floating-point literals too large or small for Ruby to represent.
|
444
|
-
Enabled: true
|
445
|
-
|
446
|
-
Lint/FormatParameterMismatch:
|
447
|
-
Description: The number of parameters to format/sprint must match the fields.
|
448
|
-
Enabled: true
|
449
|
-
|
450
|
-
Lint/HandleExceptions:
|
451
|
-
Description: Don't suppress exception.
|
452
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
|
453
|
-
Enabled: true
|
454
|
-
|
455
|
-
Lint/ImplicitStringConcatenation:
|
456
|
-
Description: Checks for adjacent string literals on the same line, which could better be represented as a single string literal.
|
457
|
-
Enabled: true
|
458
|
-
|
459
|
-
Lint/IneffectiveAccessModifier:
|
460
|
-
Description: Checks for attempts to use `private` or `protected` to set the visibility of a class method, which does not work.
|
461
|
-
Enabled: true
|
462
|
-
|
463
|
-
Lint/InheritException:
|
464
|
-
Description: Avoid inheriting from the `Exception` class.
|
465
|
-
Enabled: true
|
466
|
-
|
467
|
-
Lint/InterpolationCheck:
|
468
|
-
Description: Raise warning for interpolation in single q strs
|
469
|
-
Enabled: true
|
470
|
-
|
471
|
-
Lint/LiteralAsCondition:
|
472
|
-
Description: Checks of literals used in conditions.
|
473
|
-
Enabled: true
|
474
|
-
|
475
|
-
Lint/LiteralInInterpolation:
|
476
|
-
Description: Checks for literals used in interpolation.
|
477
|
-
Enabled: true
|
478
|
-
|
479
|
-
Lint/Loop:
|
480
|
-
Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while for post-loop tests.
|
481
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#loop-with-break
|
482
|
-
Enabled: true
|
483
|
-
|
484
|
-
Lint/MultipleCompare:
|
485
|
-
Description: Use `&&` operator to compare multiple value.
|
486
|
-
Enabled: true
|
487
|
-
|
488
|
-
Lint/NestedMethodDefinition:
|
489
|
-
Description: Do not use nested method definitions.
|
490
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-methods
|
491
|
-
Enabled: true
|
492
|
-
|
493
|
-
Lint/NextWithoutAccumulator:
|
494
|
-
Description: Do not omit the accumulator when calling `next` in a `reduce`/`inject` block.
|
495
|
-
Enabled: true
|
496
|
-
|
497
|
-
Lint/NonLocalExitFromIterator:
|
498
|
-
Description: Do not use return in iterator to cause non-local exit.
|
499
|
-
Enabled: true
|
500
|
-
|
501
|
-
Lint/ParenthesesAsGroupedExpression:
|
502
|
-
Description: Checks for method calls with a space before the opening parenthesis.
|
503
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
|
504
|
-
Enabled: true
|
505
|
-
|
506
|
-
Lint/PercentStringArray:
|
507
|
-
Description: Checks for unwanted commas and quotes in %w/%W literals.
|
508
|
-
Enabled: true
|
509
|
-
|
510
|
-
Lint/PercentSymbolArray:
|
511
|
-
Description: Checks for unwanted commas and colons in %i/%I literals.
|
512
|
-
Enabled: true
|
513
|
-
|
514
|
-
Lint/RandOne:
|
515
|
-
Description: Checks for `rand(1)` calls. Such calls always return `0` and most likely a mistake.
|
516
|
-
Enabled: true
|
517
|
-
|
518
|
-
Lint/RedundantWithIndex:
|
519
|
-
Description: Checks for redundant `with_index`.
|
520
|
-
Enabled: true
|
521
|
-
|
522
|
-
Lint/RedundantWithObject:
|
523
|
-
Description: Checks for redundant `with_object`.
|
524
|
-
Enabled: true
|
525
|
-
|
526
|
-
Lint/RegexpAsCondition:
|
527
|
-
Description: Do not use regexp literal as a condition. The regexp literal matches `$_` implicitly.
|
528
|
-
Enabled: true
|
529
|
-
|
530
|
-
Lint/RequireParentheses:
|
531
|
-
Description: Use parentheses in the method call to avoid confusion about precedence.
|
532
|
-
Enabled: true
|
533
|
-
|
534
|
-
Lint/RescueException:
|
535
|
-
Description: Avoid rescuing the Exception class.
|
536
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-blind-rescues
|
537
|
-
Enabled: true
|
538
|
-
|
539
|
-
Lint/RescueType:
|
540
|
-
Description: Avoid rescuing from non constants that could result in a `TypeError`.
|
541
|
-
Enabled: true
|
542
|
-
|
543
|
-
Style/RescueStandardError:
|
544
|
-
Description: Avoid rescuing without specifying an error class.
|
545
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-blind-rescues'
|
546
|
-
Enabled: true
|
1
|
+
---
|
2
|
+
require:
|
3
|
+
- rubocop-performance
|
547
4
|
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
Lint/UnreachableCode:
|
604
|
-
Description: Unreachable code.
|
605
|
-
Enabled: true
|
606
|
-
|
607
|
-
Lint/UriEscapeUnescape:
|
608
|
-
Description: "`URI.escape` method is obsolete and should not be used. Instead, use `CGI.escape`, `URI.encode_www_form` or `URI.encode_www_form_component` depending on your specific use case. Also `URI.unescape` method is obsolete and should not be used. Instead, use `CGI.unescape`, `URI.decode_www_form` or `URI.decode_www_form_component` depending on your specific use case."
|
609
|
-
Enabled: true
|
610
|
-
|
611
|
-
Lint/UriRegexp:
|
612
|
-
Description: Use `URI::DEFAULT_PARSER.make_regexp` instead of `URI.regexp`.
|
613
|
-
Enabled: true
|
614
|
-
|
615
|
-
Lint/UselessAccessModifier:
|
616
|
-
Description: Checks for useless access modifiers.
|
617
|
-
Enabled: true
|
618
|
-
ContextCreatingMethods: []
|
619
|
-
MethodCreatingMethods: []
|
620
|
-
|
621
|
-
Lint/UselessAssignment:
|
622
|
-
Description: Checks for useless assignment to a local variable.
|
623
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
|
624
|
-
Enabled: true
|
625
|
-
|
626
|
-
Lint/UselessComparison:
|
627
|
-
Description: Checks for comparison of something with itself.
|
628
|
-
Enabled: true
|
629
|
-
|
630
|
-
Lint/UselessElseWithoutRescue:
|
631
|
-
Description: Checks for useless `else` in `begin..end` without `rescue`.
|
632
|
-
Enabled: true
|
633
|
-
|
634
|
-
Lint/ReturnInVoidContext:
|
635
|
-
Description: Checks for return in void context.
|
636
|
-
Enabled: true
|
637
|
-
|
638
|
-
Lint/UselessSetterCall:
|
639
|
-
Description: Checks for useless setter call to a local variable.
|
640
|
-
Enabled: true
|
641
|
-
|
642
|
-
Lint/Void:
|
643
|
-
Description: Possible use of operator/literal/variable in void context.
|
644
|
-
Enabled: true
|
645
|
-
|
646
|
-
# Department Metrics
|
647
|
-
Metrics/AbcSize:
|
648
|
-
Description: A calculated magnitude based on number of assignments, branches, and conditions.
|
649
|
-
Reference: http://c2.com/cgi/wiki?AbcMetric
|
650
|
-
Enabled: true
|
651
|
-
Max: 20
|
652
|
-
|
653
|
-
Metrics/BlockLength:
|
654
|
-
Description: Avoid long blocks with many lines.
|
655
|
-
Enabled: true
|
656
|
-
Exclude:
|
657
|
-
- Rakefile
|
658
|
-
- "**/*.rake"
|
659
|
-
- spec/**/*.rb
|
660
|
-
|
661
|
-
Metrics/BlockNesting:
|
662
|
-
Description: Avoid excessive block nesting
|
663
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count
|
664
|
-
Enabled: true
|
665
|
-
Max: 4
|
666
|
-
|
667
|
-
Metrics/ClassLength:
|
668
|
-
Description: Avoid classes longer than 100 lines of code.
|
669
|
-
Enabled: true
|
670
|
-
Max: 100
|
671
|
-
|
672
|
-
Metrics/CyclomaticComplexity:
|
673
|
-
Description: A complexity metric that is strongly correlated to the number of test cases needed to validate a method.
|
674
|
-
Enabled: true
|
675
|
-
|
676
|
-
Metrics/LineLength:
|
677
|
-
Description: Limit lines to 80 characters.
|
678
|
-
StyleGuide: '#80-character-limits'
|
679
|
-
Enabled: true
|
680
|
-
|
681
|
-
Metrics/MethodLength:
|
682
|
-
Description: Avoid methods longer than 10 lines of code.
|
683
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
|
684
|
-
Enabled: true
|
5
|
+
AllCops:
|
6
|
+
RubyInterpreters:
|
7
|
+
- ruby
|
8
|
+
- rake
|
9
|
+
# Include common Ruby source files.
|
10
|
+
Include:
|
11
|
+
- '**/*.rb'
|
12
|
+
- '**/*.arb'
|
13
|
+
- '**/*.axlsx'
|
14
|
+
- '**/*.builder'
|
15
|
+
- '**/*.fcgi'
|
16
|
+
- '**/*.gemfile'
|
17
|
+
- '**/*.gemspec'
|
18
|
+
- '**/*.god'
|
19
|
+
- '**/*.jb'
|
20
|
+
- '**/*.jbuilder'
|
21
|
+
- '**/*.mspec'
|
22
|
+
- '**/*.opal'
|
23
|
+
- '**/*.pluginspec'
|
24
|
+
- '**/*.podspec'
|
25
|
+
- '**/*.rabl'
|
26
|
+
- '**/*.rake'
|
27
|
+
- '**/*.rbuild'
|
28
|
+
- '**/*.rbw'
|
29
|
+
- '**/*.rbx'
|
30
|
+
- '**/*.ru'
|
31
|
+
- '**/*.ruby'
|
32
|
+
- '**/*.spec'
|
33
|
+
- '**/*.thor'
|
34
|
+
- '**/*.watchr'
|
35
|
+
- '**/.irbrc'
|
36
|
+
- '**/.pryrc'
|
37
|
+
- '**/buildfile'
|
38
|
+
- '**/Appraisals'
|
39
|
+
- '**/Berksfile'
|
40
|
+
- '**/Brewfile'
|
41
|
+
- '**/Buildfile'
|
42
|
+
- '**/Capfile'
|
43
|
+
- '**/Cheffile'
|
44
|
+
- '**/Dangerfile'
|
45
|
+
- '**/Deliverfile'
|
46
|
+
- '**/Fastfile'
|
47
|
+
- '**/*Fastfile'
|
48
|
+
- '**/Gemfile'
|
49
|
+
- '**/Guardfile'
|
50
|
+
- '**/Jarfile'
|
51
|
+
- '**/Mavenfile'
|
52
|
+
- '**/Podfile'
|
53
|
+
- '**/Puppetfile'
|
54
|
+
- '**/Rakefile'
|
55
|
+
- '**/Snapfile'
|
56
|
+
- '**/Thorfile'
|
57
|
+
- '**/Vagabondfile'
|
58
|
+
- '**/Vagrantfile'
|
685
59
|
Exclude:
|
686
|
-
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#accessor_mutator_method_names
|
707
|
-
Enabled: false
|
60
|
+
- 'node_modules/**/*'
|
61
|
+
- 'vendor/**/*'
|
62
|
+
- '.git/**/*'
|
63
|
+
- 'bin/bundle'
|
64
|
+
- 'lib/generators/templates/**/*'
|
65
|
+
- 'test/rails_app/**/*'
|
66
|
+
- 'test/tmp/**/*'
|
67
|
+
DefaultFormatter: progress
|
68
|
+
DisplayCopNames: true
|
69
|
+
DisplayStyleGuide: false
|
70
|
+
StyleGuideBaseURL: https://rubystyle.guide
|
71
|
+
ExtraDetails: false
|
72
|
+
StyleGuideCopsOnly: false
|
73
|
+
EnabledByDefault: false
|
74
|
+
DisabledByDefault: false
|
75
|
+
UseCache: true
|
76
|
+
MaxFilesInCache: 20000
|
77
|
+
CacheRootDirectory: ~
|
78
|
+
AllowSymlinksInCacheRootDirectory: false
|
79
|
+
TargetRubyVersion: 2.6
|
708
80
|
|
709
|
-
|
710
|
-
Description: Use only ascii symbols in identifiers.
|
711
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-identifiers
|
81
|
+
Style/MixinUsage:
|
712
82
|
Enabled: false
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#
|
717
|
-
Enabled: true
|
718
|
-
|
719
|
-
Naming/ConstantName:
|
720
|
-
Description: Constants should use SCREAMING_SNAKE_CASE.
|
721
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#screaming-snake-case
|
722
|
-
Enabled: true
|
723
|
-
|
724
|
-
Naming/FileName:
|
725
|
-
Description: Use snake_case for source file names.
|
726
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
|
727
|
-
Enabled: true
|
728
|
-
|
729
|
-
Naming/HeredocDelimiterCase:
|
730
|
-
Description: Use configured case for heredoc delimiters.
|
731
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#heredoc-delimiters
|
732
|
-
Enabled: true
|
733
|
-
|
734
|
-
Naming/HeredocDelimiterNaming:
|
735
|
-
Description: Use descriptive heredoc delimiters.
|
736
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#heredoc-delimiters
|
83
|
+
Lint/AmbiguousOperator:
|
84
|
+
Description: Checks for ambiguous operators in the first argument of a method invocation
|
85
|
+
without parentheses.
|
86
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-as-args
|
737
87
|
Enabled: true
|
738
|
-
|
739
|
-
Naming/MethodName:
|
740
|
-
Description: Use the configured style when naming methods.
|
741
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
|
88
|
+
Lint/AmbiguousBlockAssociation:
|
742
89
|
Enabled: false
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
|
747
|
-
Enabled: true
|
748
|
-
|
749
|
-
Naming/BinaryOperatorParameterName:
|
750
|
-
Description: When defining binary operators, name the argument other.
|
751
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#other-arg
|
752
|
-
Enabled: true
|
753
|
-
|
754
|
-
Naming/VariableName:
|
755
|
-
Description: Use the configured style when naming variables.
|
756
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
|
757
|
-
Enabled: true
|
758
|
-
|
759
|
-
Naming/VariableNumber:
|
760
|
-
Description: Use the configured style when numbering variables.
|
761
|
-
Enabled: true
|
762
|
-
|
763
|
-
# Department Performance
|
764
|
-
Performance/Caller:
|
765
|
-
Description: Use `caller(n..n)` instead of `caller`.
|
766
|
-
Enabled: true
|
767
|
-
|
768
|
-
Performance/Casecmp:
|
769
|
-
Description: Use `casecmp` rather than `downcase ==`, `upcase ==`, `== downcase`, or `== upcase`..
|
770
|
-
Reference: https://github.com/JuanitoFatas/fast-ruby#stringcasecmp-vs-stringdowncase---code
|
771
|
-
Enabled: true
|
772
|
-
|
773
|
-
Performance/CaseWhenSplat:
|
774
|
-
Description: Place `when` conditions that use splat at the end of the list of `when` branches.
|
775
|
-
Enabled: true
|
776
|
-
|
777
|
-
Performance/Count:
|
778
|
-
Description: Use `count` instead of `select...size`, `reject...size`, `select...count`, `reject...count`, `select...length`, and `reject...length`.
|
779
|
-
SafeMode: true
|
780
|
-
Enabled: true
|
781
|
-
|
782
|
-
Performance/Detect:
|
783
|
-
Description: Use `detect` instead of `select.first`, `find_all.first`, `select.last`, and `find_all.last`.
|
784
|
-
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
|
785
|
-
SafeMode: true
|
786
|
-
Enabled: true
|
787
|
-
|
788
|
-
Performance/DoubleStartEndWith:
|
789
|
-
Description: Use `str.{start,end}_with?(x, ..., y, ...)` instead of `str.{start,end}_with?(x, ...) || str.{start,end}_with?(y, ...)`.
|
790
|
-
Enabled: true
|
791
|
-
|
792
|
-
Performance/EndWith:
|
793
|
-
Description: Use `end_with?` instead of a regex match anchored to the end of a string.
|
794
|
-
Reference: https://github.com/JuanitoFatas/fast-ruby#stringmatch-vs-stringstart_withstringend_with-code-start-code-end
|
795
|
-
AutoCorrect: false
|
796
|
-
Enabled: true
|
797
|
-
|
798
|
-
Performance/FixedSize:
|
799
|
-
Description: Do not compute the size of statically sized objects except in constants
|
800
|
-
Enabled: true
|
801
|
-
|
802
|
-
Performance/FlatMap:
|
803
|
-
Description: Use `Enumerable#flat_map` instead of `Enumerable#map...Array#flatten(1)` or `Enumberable#collect..Array#flatten(1)`
|
804
|
-
Reference: https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code
|
805
|
-
Enabled: true
|
806
|
-
EnabledForFlattenWithoutParams: false
|
807
|
-
|
808
|
-
Performance/HashEachMethods:
|
809
|
-
Description: Use `Hash#each_key` and `Hash#each_value` instead of `Hash#keys.each` and `Hash#values.each`.
|
810
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-each
|
90
|
+
Lint/AmbiguousRegexpLiteral:
|
91
|
+
Description: Checks for ambiguous regexp literals in the first argument of a method
|
92
|
+
invocation without parenthesis.
|
811
93
|
Enabled: true
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
Description: Use `strip` instead of `lstrip.rstrip`.
|
94
|
+
Lint/AssignmentInCondition:
|
95
|
+
Description: Don't use assignment in conditions.
|
96
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
|
816
97
|
Enabled: true
|
817
|
-
|
818
|
-
|
819
|
-
Description: Use `Range#cover?` instead of `Range#include?`.
|
820
|
-
Reference: https://github.com/JuanitoFatas/fast-ruby#cover-vs-include-code
|
98
|
+
Layout/BlockAlignment:
|
99
|
+
Description: Align block ends correctly.
|
821
100
|
Enabled: true
|
822
|
-
|
823
|
-
|
824
|
-
Description: Use `yield` instead of `block.call`.
|
825
|
-
Reference: https://github.com/JuanitoFatas/fast-ruby#proccall-vs-yield-code
|
101
|
+
Lint/CircularArgumentReference:
|
102
|
+
Description: Don't refer to the keyword argument in the default value.
|
826
103
|
Enabled: true
|
827
|
-
|
828
|
-
|
829
|
-
|
104
|
+
Layout/ConditionPosition:
|
105
|
+
Description: Checks for condition placed in a confusing position relative to the
|
106
|
+
keyword.
|
107
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#same-line-condition
|
830
108
|
Enabled: true
|
831
|
-
|
832
|
-
|
833
|
-
Description: Use Hash#[]=, rather than Hash#merge! with a single key-value pair.
|
834
|
-
Reference: https://github.com/JuanitoFatas/fast-ruby#hashmerge-vs-hash-code
|
109
|
+
Lint/Debugger:
|
110
|
+
Description: Check for debugger calls.
|
835
111
|
Enabled: true
|
836
|
-
|
837
|
-
|
838
|
-
Description: Use `sort` instead of `sort_by { |x| x }`.
|
112
|
+
Layout/DefEndAlignment:
|
113
|
+
Description: Align ends corresponding to defs correctly.
|
839
114
|
Enabled: true
|
840
|
-
|
841
|
-
|
842
|
-
Description: Use `match?` instead of `Regexp#match`, `String#match`, `Symbol#match`, `Regexp#===`, or `=~` when `MatchData` is not used.
|
115
|
+
Lint/DeprecatedClassMethods:
|
116
|
+
Description: Check for deprecated class method calls.
|
843
117
|
Enabled: true
|
844
|
-
|
845
|
-
|
846
|
-
Description: Use `reverse_each` instead of `reverse.each`.
|
847
|
-
Reference: https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code
|
118
|
+
Lint/DuplicateMethods:
|
119
|
+
Description: Check for duplicate methods calls.
|
848
120
|
Enabled: true
|
849
|
-
|
850
|
-
|
851
|
-
Description: Use `sample` instead of `shuffle.first`, `shuffle.last`, and `shuffle[Integer]`.
|
852
|
-
Reference: https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code
|
121
|
+
Lint/EachWithObjectArgument:
|
122
|
+
Description: Check for immutable argument given to each_with_object.
|
853
123
|
Enabled: true
|
854
|
-
|
855
|
-
|
856
|
-
Description: Use `size` instead of `count` for counting the number of elements in `Array` and `Hash`.
|
857
|
-
Reference: https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code
|
124
|
+
Lint/ElseLayout:
|
125
|
+
Description: Check for odd code arrangement in an else block.
|
858
126
|
Enabled: true
|
859
|
-
|
860
|
-
|
861
|
-
Description: Use `sort_by(&:foo)` instead of `sort { |a, b| a.foo <=> b.foo }`.
|
127
|
+
Lint/EmptyEnsure:
|
128
|
+
Description: Checks for empty ensure block.
|
862
129
|
Enabled: true
|
863
|
-
|
864
|
-
|
865
|
-
Description: Use `start_with?` instead of a regex match anchored to the beginning of a string.
|
866
|
-
Reference: https://github.com/JuanitoFatas/fast-ruby#stringmatch-vs-stringstart_withstringend_with-code-start-code-end
|
867
|
-
AutoCorrect: false
|
130
|
+
Lint/EmptyInterpolation:
|
131
|
+
Description: Checks for empty string interpolation.
|
868
132
|
Enabled: true
|
869
|
-
|
870
|
-
|
871
|
-
Description: Use `tr` instead of `gsub` when you are replacing the same number of characters. Use `delete` instead of `gsub` when you are deleting characters.
|
872
|
-
Reference: https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code
|
133
|
+
Layout/EndAlignment:
|
134
|
+
Description: Align ends correctly.
|
873
135
|
Enabled: true
|
874
|
-
|
875
|
-
|
876
|
-
Description: Checks for .times.map calls.
|
877
|
-
AutoCorrect: false
|
136
|
+
Lint/EndInMethod:
|
137
|
+
Description: END blocks should not be placed inside method definitions.
|
878
138
|
Enabled: true
|
879
|
-
|
880
|
-
|
881
|
-
|
139
|
+
Lint/EnsureReturn:
|
140
|
+
Description: Do not use return in an ensure block.
|
141
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-return-ensure
|
882
142
|
Enabled: true
|
883
|
-
|
884
|
-
|
885
|
-
Description: Use `URI::DEFAULT_PARSER` instead of `URI::Parser.new`.
|
143
|
+
Lint/FormatParameterMismatch:
|
144
|
+
Description: The number of parameters to format/sprint must match the fields.
|
886
145
|
Enabled: true
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
Description: Enforces consistent use of action filter methods.
|
891
|
-
Enabled: false
|
892
|
-
|
893
|
-
Rails/ApplicationJob:
|
894
|
-
Description: Check that jobs subclass ApplicationJob.
|
146
|
+
Lint/HandleExceptions:
|
147
|
+
Description: Don't suppress exception.
|
148
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
|
895
149
|
Enabled: true
|
896
|
-
|
897
|
-
|
898
|
-
Description: Check that models subclass ApplicationRecord.
|
150
|
+
Lint/LiteralInInterpolation:
|
151
|
+
Description: Checks for literals used in interpolation.
|
899
152
|
Enabled: true
|
900
|
-
|
901
|
-
|
902
|
-
|
153
|
+
Lint/Loop:
|
154
|
+
Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while
|
155
|
+
for post-loop tests.
|
156
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#loop-with-break
|
903
157
|
Enabled: true
|
904
|
-
|
905
|
-
|
906
|
-
|
158
|
+
Lint/NestedMethodDefinition:
|
159
|
+
Description: Do not use nested method definitions.
|
160
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-methods
|
907
161
|
Enabled: true
|
908
|
-
|
909
|
-
|
910
|
-
UnlessPresent: true
|
911
|
-
|
912
|
-
Rails/Date:
|
913
|
-
Description: Checks the correct usage of date aware methods, such as Date.today, Date.current etc.
|
162
|
+
Lint/NonLocalExitFromIterator:
|
163
|
+
Description: Do not use return in iterator to cause non-local exit.
|
914
164
|
Enabled: true
|
915
|
-
|
916
|
-
|
917
|
-
|
165
|
+
Lint/ParenthesesAsGroupedExpression:
|
166
|
+
Description: Checks for method calls with a space before the opening parenthesis.
|
167
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
|
918
168
|
Enabled: true
|
919
|
-
|
920
|
-
|
921
|
-
Description: Do not use allow_blank as an option to delegate.
|
169
|
+
Lint/RequireParentheses:
|
170
|
+
Description: Use parentheses in the method call to avoid confusion about precedence.
|
922
171
|
Enabled: true
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
StyleGuide: https://github.com/bbatsov/rails-style-guide#find_by
|
172
|
+
Lint/RescueException:
|
173
|
+
Description: Avoid rescuing the Exception class.
|
174
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-blind-rescues
|
927
175
|
Enabled: true
|
928
|
-
|
929
|
-
|
930
|
-
|
176
|
+
Lint/ShadowingOuterLocalVariable:
|
177
|
+
Description: Do not use the same name as outer local variable for block arguments
|
178
|
+
or block local variables.
|
931
179
|
Enabled: true
|
932
|
-
|
933
|
-
|
934
|
-
|
180
|
+
Lint/StringConversionInInterpolation:
|
181
|
+
Description: Checks for Object#to_s usage in string interpolation.
|
182
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-to-s
|
935
183
|
Enabled: true
|
936
|
-
|
937
|
-
|
938
|
-
Description: Use `Rails.root.join` for file path joining.
|
184
|
+
Lint/UnderscorePrefixedVariableName:
|
185
|
+
Description: Do not use prefix `_` for a variable that is used.
|
939
186
|
Enabled: true
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
StyleGuide: https://github.com/bbatsov/rails-style-guide#find_by
|
187
|
+
Lint/UnusedBlockArgument:
|
188
|
+
Description: Checks for unused block arguments.
|
189
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
|
944
190
|
Enabled: true
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
StyleGuide: https://github.com/bbatsov/rails-style-guide#find-each
|
191
|
+
Lint/UnusedMethodArgument:
|
192
|
+
Description: Checks for unused method arguments.
|
193
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
|
949
194
|
Enabled: true
|
950
|
-
|
951
|
-
|
952
|
-
Description: Prefer has_many :through to has_and_belongs_to_many.
|
953
|
-
StyleGuide: https://github.com/bbatsov/rails-style-guide#has-many-through
|
195
|
+
Lint/UnreachableCode:
|
196
|
+
Description: Unreachable code.
|
954
197
|
Enabled: true
|
955
|
-
|
956
|
-
|
957
|
-
Description: Define the dependent option to the has_many and has_one associations.
|
958
|
-
StyleGuide: https://github.com/bbatsov/rails-style-guide#has_many-has_one-dependent-option
|
198
|
+
Lint/UselessAccessModifier:
|
199
|
+
Description: Checks for useless access modifiers.
|
959
200
|
Enabled: true
|
960
|
-
|
961
|
-
|
962
|
-
|
201
|
+
Lint/UselessAssignment:
|
202
|
+
Description: Checks for useless assignment to a local variable.
|
203
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
|
963
204
|
Enabled: true
|
964
|
-
|
965
|
-
|
966
|
-
Description: Do not add a NOT NULL column without a default value
|
205
|
+
Lint/UselessComparison:
|
206
|
+
Description: Checks for comparison of something with itself.
|
967
207
|
Enabled: true
|
968
|
-
|
969
|
-
|
970
|
-
Description: Checks for calls to puts, print, etc.
|
208
|
+
Lint/UselessElseWithoutRescue:
|
209
|
+
Description: Checks for useless `else` in `begin..end` without `rescue`.
|
971
210
|
Enabled: true
|
972
|
-
|
973
|
-
|
974
|
-
Description: The use of `html_safe` or `raw` may be a security risk.
|
211
|
+
Lint/UselessSetterCall:
|
212
|
+
Description: Checks for useless setter call to a local variable.
|
975
213
|
Enabled: true
|
976
|
-
|
977
|
-
|
978
|
-
Description: Checks for incorrect grammar when using methods like `3.day.ago`.
|
214
|
+
Lint/Void:
|
215
|
+
Description: Possible use of operator/literal/variable in void context.
|
979
216
|
Enabled: true
|
980
|
-
|
981
|
-
|
982
|
-
|
217
|
+
Metrics/AbcSize:
|
218
|
+
Description: A calculated magnitude based on number of assignments, branches, and
|
219
|
+
conditions.
|
220
|
+
Reference: http://c2.com/cgi/wiki?AbcMetric
|
983
221
|
Enabled: true
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
Rails/ReadWriteAttribute:
|
989
|
-
Description: Checks for read_attribute(:attr) and write_attribute(:attr, val).
|
990
|
-
StyleGuide: https://github.com/bbatsov/rails-style-guide#read-attribute
|
991
|
-
Enabled: false
|
992
|
-
|
993
|
-
Rails/RelativeDateConstant:
|
994
|
-
Description: Do not assign relative date to constants.
|
222
|
+
Max: 15
|
223
|
+
Metrics/BlockNesting:
|
224
|
+
Description: Avoid excessive block nesting
|
225
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count
|
995
226
|
Enabled: true
|
996
|
-
|
997
|
-
|
998
|
-
Description:
|
227
|
+
Max: 4
|
228
|
+
Metrics/ClassLength:
|
229
|
+
Description: Avoid classes longer than 100 lines of code.
|
999
230
|
Enabled: true
|
1000
|
-
|
1001
|
-
|
1002
|
-
Description:
|
1003
|
-
|
1004
|
-
Reference: http://api.rubyonrails.org/classes/ActiveRecord/Migration/CommandRecorder.html
|
231
|
+
Max: 100
|
232
|
+
Metrics/CyclomaticComplexity:
|
233
|
+
Description: A complexity metric that is strongly correlated to the number of test
|
234
|
+
cases needed to validate a method.
|
1005
235
|
Enabled: true
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
236
|
+
Metrics/LineLength:
|
237
|
+
Description: Limit lines to 80 characters.
|
238
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#80-character-limits
|
1009
239
|
Enabled: true
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
Rails/ScopeArgs:
|
1017
|
-
Description: Checks the arguments of ActiveRecord scopes.
|
240
|
+
Exclude:
|
241
|
+
- "**/*.gemspec"
|
242
|
+
Metrics/MethodLength:
|
243
|
+
Description: Avoid methods longer than 10 lines of code.
|
244
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
|
1018
245
|
Enabled: true
|
1019
|
-
|
1020
|
-
|
1021
|
-
Description:
|
1022
|
-
StyleGuide: https://github.com/bbatsov/rails-style-guide#time
|
1023
|
-
Reference: http://danilenko.org/2012/7/6/rails_timezones
|
246
|
+
Max: 10
|
247
|
+
Metrics/ModuleLength:
|
248
|
+
Description: Avoid modules longer than 100 lines of code.
|
1024
249
|
Enabled: true
|
1025
|
-
|
1026
|
-
|
1027
|
-
Description:
|
250
|
+
Max: 100
|
251
|
+
Metrics/ParameterLists:
|
252
|
+
Description: Avoid parameter lists longer than three or four parameters.
|
253
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
|
254
|
+
Enabled: false
|
255
|
+
Metrics/PerceivedComplexity:
|
256
|
+
Description: A complexity metric geared towards measuring complexity for a human
|
257
|
+
reader.
|
1028
258
|
Enabled: true
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
259
|
+
Metrics/BlockLength:
|
260
|
+
Exclude:
|
261
|
+
- Rakefile
|
262
|
+
- "**/*.rake"
|
263
|
+
- spec/**/*.rb
|
264
|
+
- "**/*.gemspec"
|
265
|
+
Performance/Count:
|
266
|
+
Description: Use `count` instead of `select...size`, `reject...size`, `select...count`,
|
267
|
+
`reject...count`, `select...length`, and `reject...length`.
|
1032
268
|
Enabled: true
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
Reference:
|
269
|
+
Performance/Detect:
|
270
|
+
Description: Use `detect` instead of `select.first`, `find_all.first`, `select.last`,
|
271
|
+
and `find_all.last`.
|
272
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code
|
1037
273
|
Enabled: true
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
274
|
+
Performance/FlatMap:
|
275
|
+
Description: Use `Enumerable#flat_map` instead of `Enumerable#map...Array#flatten(1)`
|
276
|
+
or `Enumberable#collect..Array#flatten(1)`
|
277
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code
|
1041
278
|
Enabled: true
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
279
|
+
EnabledForFlattenWithoutParams: false
|
280
|
+
Performance/ReverseEach:
|
281
|
+
Description: Use `reverse_each` instead of `reverse.each`.
|
282
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code
|
1046
283
|
Enabled: true
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
Reference: http://ruby-doc.org/stdlib-2.3.0/libdoc/json/rdoc/JSON.html#method-i-load
|
284
|
+
Style/Sample:
|
285
|
+
Description: Use `sample` instead of `shuffle.first`, `shuffle.last`, and `shuffle[Fixnum]`.
|
286
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code
|
1051
287
|
Enabled: true
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
Reference: http://ruby-doc.org/core-2.3.3/Marshal.html#module-Marshal-label-Security+considerations
|
288
|
+
Performance/Size:
|
289
|
+
Description: Use `size` instead of `count` for counting the number of elements in
|
290
|
+
`Array` and `Hash`.
|
291
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code
|
1057
292
|
Enabled: true
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
Reference: https://
|
293
|
+
Performance/StringReplacement:
|
294
|
+
Description: Use `tr` instead of `gsub` when you are replacing the same number of
|
295
|
+
characters. Use `delete` instead of `gsub` when you are deleting characters.
|
296
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code
|
1062
297
|
Enabled: true
|
1063
|
-
|
1064
|
-
|
298
|
+
Layout/AccessModifierIndentation:
|
299
|
+
Description: Check indentation of private/protected visibility modifiers.
|
300
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected
|
301
|
+
Enabled: false
|
302
|
+
Naming/AccessorMethodName:
|
303
|
+
Description: Check the naming of accessor methods for get_/set_.
|
304
|
+
Enabled: false
|
1065
305
|
Style/Alias:
|
1066
|
-
Description: Use
|
306
|
+
Description: Use alias_method instead of alias.
|
1067
307
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
|
1068
308
|
Enabled: false
|
1069
|
-
|
309
|
+
Layout/AlignArray:
|
310
|
+
Description: Align the elements of an array literal if they span more than one line.
|
311
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays
|
312
|
+
Enabled: true
|
313
|
+
Layout/AlignHash:
|
314
|
+
Description: Align the elements of a hash literal if they span more than one line.
|
315
|
+
Enabled: true
|
316
|
+
Layout/AlignParameters:
|
317
|
+
Description: Align the parameters of a method call if they span more than one line.
|
318
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
|
319
|
+
Enabled: true
|
1070
320
|
Style/AndOr:
|
1071
321
|
Description: Use &&/|| instead of and/or.
|
1072
322
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-and-or-or
|
1073
323
|
Enabled: true
|
1074
|
-
|
1075
324
|
Style/ArrayJoin:
|
1076
325
|
Description: Use Array#join instead of Array#*.
|
1077
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#array-join
|
326
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#array-join
|
1078
327
|
Enabled: false
|
1079
|
-
|
1080
328
|
Style/AsciiComments:
|
1081
329
|
Description: Use only ascii symbols in comments.
|
1082
330
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-comments
|
1083
331
|
Enabled: false
|
1084
|
-
|
332
|
+
Naming/AsciiIdentifiers:
|
333
|
+
Description: Use only ascii symbols in identifiers.
|
334
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-identifiers
|
335
|
+
Enabled: false
|
1085
336
|
Style/Attr:
|
1086
337
|
Description: Checks for uses of Module#attr.
|
1087
338
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr
|
1088
339
|
Enabled: true
|
1089
|
-
|
1090
|
-
Style/AutoResourceCleanup:
|
1091
|
-
Description: Suggests the usage of an auto resource cleanup version of a method (if available).
|
1092
|
-
Enabled: false
|
1093
|
-
|
1094
340
|
Style/BeginBlock:
|
1095
341
|
Description: Avoid the use of BEGIN blocks.
|
1096
342
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks
|
1097
343
|
Enabled: true
|
1098
|
-
|
1099
344
|
Style/BarePercentLiterals:
|
1100
345
|
Description: Checks if usage of %() or %Q() matches configuration.
|
1101
346
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand
|
1102
347
|
Enabled: true
|
1103
|
-
|
1104
348
|
Style/BlockComments:
|
1105
349
|
Description: Do not use block comments.
|
1106
350
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-block-comments
|
1107
351
|
Enabled: false
|
1108
|
-
|
352
|
+
Layout/BlockEndNewline:
|
353
|
+
Description: Put end statement of multiline block on its own line.
|
354
|
+
Enabled: true
|
1109
355
|
Style/BlockDelimiters:
|
1110
|
-
Description: Avoid using {...} for multi-line blocks (multiline chaining is always
|
356
|
+
Description: Avoid using {...} for multi-line blocks (multiline chaining is always
|
357
|
+
ugly). Prefer {...} over do...end for single-line blocks.
|
1111
358
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
|
1112
359
|
Enabled: true
|
1113
|
-
|
1114
360
|
Style/BracesAroundHashParameters:
|
1115
361
|
Description: Enforce braces style around hash parameters.
|
1116
362
|
Enabled: false
|
1117
|
-
|
1118
363
|
Style/CaseEquality:
|
1119
364
|
Description: Avoid explicit use of the case equality operator(===).
|
1120
365
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-case-equality
|
1121
366
|
Enabled: false
|
1122
|
-
|
367
|
+
Layout/CaseIndentation:
|
368
|
+
Description: Indentation of when in a case/when/[else/]end.
|
369
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-when-to-case
|
370
|
+
Enabled: true
|
1123
371
|
Style/CharacterLiteral:
|
1124
372
|
Description: Checks for uses of character literals.
|
1125
373
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-character-literals
|
1126
374
|
Enabled: false
|
1127
|
-
|
375
|
+
Naming/ClassAndModuleCamelCase:
|
376
|
+
Description: Use CamelCase for classes and modules.
|
377
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#camelcase-classes
|
378
|
+
Enabled: true
|
1128
379
|
Style/ClassAndModuleChildren:
|
1129
380
|
Description: Checks style of children classes and modules.
|
1130
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#namespace-definition
|
1131
381
|
Enabled: false
|
1132
|
-
|
1133
382
|
Style/ClassCheck:
|
1134
383
|
Description: Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.
|
1135
384
|
Enabled: true
|
1136
|
-
|
1137
385
|
Style/ClassMethods:
|
1138
386
|
Description: Use self when defining module/class methods.
|
1139
387
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#def-self-class-methods
|
1140
388
|
Enabled: false
|
1141
|
-
|
1142
389
|
Style/ClassVars:
|
1143
390
|
Description: Avoid the use of class variables.
|
1144
391
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-class-vars
|
1145
392
|
Enabled: false
|
1146
|
-
|
1147
|
-
|
1148
|
-
Description: Preferred collection methods.
|
1149
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
|
393
|
+
Layout/ClosingParenthesisIndentation:
|
394
|
+
Description: Checks the indentation of hanging closing parentheses.
|
1150
395
|
Enabled: false
|
1151
|
-
|
1152
396
|
Style/ColonMethodCall:
|
1153
397
|
Description: 'Do not use :: for method call.'
|
1154
398
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-colons
|
1155
399
|
Enabled: true
|
1156
|
-
|
1157
400
|
Style/CommandLiteral:
|
1158
401
|
Description: Use `` or %x around command literals.
|
1159
402
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-x
|
1160
403
|
Enabled: false
|
1161
|
-
|
1162
404
|
Style/CommentAnnotation:
|
1163
|
-
Description: Checks formatting of
|
405
|
+
Description: Checks formatting of annotation comments.
|
1164
406
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#annotate-keywords
|
1165
407
|
Enabled: false
|
1166
|
-
|
1167
|
-
|
1168
|
-
Description: Do not place comments on the same line as certain keywords.
|
408
|
+
Layout/CommentIndentation:
|
409
|
+
Description: Indentation of comments.
|
1169
410
|
Enabled: false
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
411
|
+
Naming/ConstantName:
|
412
|
+
Description: Constants should use SCREAMING_SNAKE_CASE.
|
413
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#screaming-snake-case
|
1173
414
|
Enabled: true
|
1174
|
-
|
1175
|
-
Style/Copyright:
|
1176
|
-
Description: Include a copyright notice in each file before any code.
|
1177
|
-
Enabled: false
|
1178
|
-
|
1179
|
-
Style/DateTime:
|
1180
|
-
Description: Use Date or Time over DateTime.
|
1181
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#date--time
|
1182
|
-
Enabled: false
|
1183
|
-
|
1184
415
|
Style/DefWithParentheses:
|
1185
416
|
Description: Use def with parentheses when there are arguments.
|
1186
417
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
|
1187
418
|
Enabled: true
|
1188
|
-
|
1189
|
-
Style/Dir:
|
1190
|
-
Description: Use the `__dir__` method to retrieve the canonicalized absolute path to the current file.
|
1191
|
-
Enabled: true
|
1192
|
-
|
1193
419
|
Style/Documentation:
|
1194
420
|
Description: Document classes and non-namespace modules.
|
1195
421
|
Enabled: false
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
Style/DocumentationMethod:
|
1201
|
-
Description: Public methods.
|
1202
|
-
Enabled: false
|
1203
|
-
Exclude:
|
1204
|
-
- 'spec/**/*'
|
1205
|
-
- 'test/**/*'
|
1206
|
-
|
422
|
+
Layout/DotPosition:
|
423
|
+
Description: Checks the position of the dot in multi-line method calls.
|
424
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
|
425
|
+
Enabled: true
|
1207
426
|
Style/DoubleNegation:
|
1208
427
|
Description: Checks for uses of double negation (!!).
|
1209
428
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
|
1210
429
|
Enabled: true
|
1211
|
-
|
1212
|
-
Style/EachForSimpleLoop:
|
1213
|
-
Description: Use `Integer#times` for a simple loop which iterates a fixed number of times.
|
1214
|
-
Enabled: true
|
1215
|
-
|
1216
430
|
Style/EachWithObject:
|
1217
431
|
Description: Prefer `each_with_object` over `inject` or `reduce`.
|
1218
432
|
Enabled: false
|
1219
|
-
|
433
|
+
Layout/ElseAlignment:
|
434
|
+
Description: Align elses and elsifs correctly.
|
435
|
+
Enabled: true
|
1220
436
|
Style/EmptyElse:
|
1221
437
|
Description: Avoid empty else-clauses.
|
1222
438
|
Enabled: true
|
1223
|
-
|
1224
|
-
|
1225
|
-
|
439
|
+
Layout/EmptyLineBetweenDefs:
|
440
|
+
Description: Use empty lines between defs.
|
441
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods
|
1226
442
|
Enabled: true
|
1227
|
-
|
443
|
+
Layout/EmptyLines:
|
444
|
+
Description: Don't use several empty lines in a row.
|
445
|
+
Enabled: true
|
446
|
+
Layout/EmptyLinesAroundAccessModifier:
|
447
|
+
Description: Keep blank lines around access modifiers.
|
448
|
+
Enabled: false
|
449
|
+
Layout/EmptyLinesAroundBlockBody:
|
450
|
+
Description: Keeps track of empty lines around block bodies.
|
451
|
+
Enabled: false
|
452
|
+
Layout/EmptyLinesAroundClassBody:
|
453
|
+
Description: Keeps track of empty lines around class bodies.
|
454
|
+
Enabled: false
|
455
|
+
Layout/EmptyLinesAroundModuleBody:
|
456
|
+
Description: Keeps track of empty lines around module bodies.
|
457
|
+
Enabled: false
|
458
|
+
Layout/EmptyLinesAroundMethodBody:
|
459
|
+
Description: Keeps track of empty lines around method bodies.
|
460
|
+
Enabled: false
|
1228
461
|
Style/EmptyLiteral:
|
1229
462
|
Description: Prefer literals to Array.new/Hash.new/String.new.
|
1230
463
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
|
1231
464
|
Enabled: false
|
1232
|
-
|
1233
|
-
Style/EmptyMethod:
|
1234
|
-
Description: Checks the formatting of empty method definitions.
|
1235
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
|
1236
|
-
Enabled: false
|
1237
|
-
|
1238
465
|
Style/EndBlock:
|
1239
466
|
Description: Avoid the use of END blocks.
|
1240
467
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-END-blocks
|
1241
468
|
Enabled: false
|
1242
|
-
|
1243
|
-
|
1244
|
-
|
1245
|
-
|
1246
|
-
Enabled: true
|
1247
|
-
|
469
|
+
Layout/EndOfLine:
|
470
|
+
Description: Use Unix-style line endings.
|
471
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#crlf
|
472
|
+
Enabled: false
|
1248
473
|
Style/EvenOdd:
|
1249
|
-
Description: Favor the use of
|
474
|
+
Description: Favor the use of Fixnum#even? && Fixnum#odd?
|
1250
475
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
|
1251
476
|
Enabled: true
|
1252
|
-
|
1253
|
-
|
1254
|
-
Description: Add the frozen_string_literal comment to the top of files to help transition from Ruby 2.3.0 to Ruby 3.0.
|
477
|
+
Layout/ExtraSpacing:
|
478
|
+
Description: Do not use unnecessary spacing.
|
1255
479
|
Enabled: true
|
1256
|
-
|
1257
|
-
|
480
|
+
Naming/FileName:
|
481
|
+
Description: Use snake_case for source file names.
|
482
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
|
483
|
+
Enabled: false
|
484
|
+
Layout/InitialIndentation:
|
485
|
+
Description: Checks the indentation of the first non-blank non-comment line in a
|
486
|
+
file.
|
487
|
+
Enabled: false
|
488
|
+
Layout/IndentFirstArgument:
|
489
|
+
Description: Checks the indentation of the first parameter in a method call.
|
490
|
+
Enabled: false
|
491
|
+
Lint/FlipFlop:
|
1258
492
|
Description: Checks for flip flops
|
1259
493
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-flip-flops
|
1260
494
|
Enabled: true
|
1261
|
-
|
1262
495
|
Style/For:
|
1263
496
|
Description: Checks use of for or each in multiline loops.
|
1264
497
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-for-loops
|
1265
498
|
Enabled: true
|
1266
|
-
|
1267
499
|
Style/FormatString:
|
1268
500
|
Description: Enforce the use of Kernel#sprintf, Kernel#format or String#%.
|
1269
501
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#sprintf
|
1270
502
|
Enabled: false
|
1271
|
-
|
1272
|
-
Style/FormatStringToken:
|
1273
|
-
Description: Use a consistent style for format string tokens.
|
1274
|
-
Enabled: true
|
1275
|
-
|
1276
503
|
Style/GlobalVars:
|
1277
504
|
Description: Do not introduce global variables.
|
1278
505
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#instance-vars
|
1279
506
|
Reference: http://www.zenspider.com/Languages/Ruby/QuickRef.html
|
1280
507
|
Enabled: true
|
1281
|
-
|
1282
508
|
Style/GuardClause:
|
1283
509
|
Description: Check for conditionals that can be replaced with guard clauses
|
1284
510
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
|
1285
511
|
Enabled: true
|
1286
|
-
|
1287
512
|
Style/HashSyntax:
|
1288
|
-
Description: 'Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a =>
|
513
|
+
Description: 'Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a =>
|
514
|
+
1, :b => 2 }.'
|
1289
515
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-literals
|
1290
516
|
Enabled: true
|
1291
|
-
|
1292
|
-
Style/IfInsideElse:
|
1293
|
-
Description: Finds if nodes inside else, which can be converted to elsif.
|
1294
|
-
Enabled: true
|
1295
|
-
|
1296
517
|
Style/IfUnlessModifier:
|
1297
518
|
Description: Favor modifier if/unless usage when you have a single-line body.
|
1298
519
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
|
1299
520
|
Enabled: true
|
1300
|
-
|
1301
|
-
Style/IfUnlessModifierOfIfUnless:
|
1302
|
-
Description: Avoid modifier if/unless usage on conditionals.
|
1303
|
-
Enabled: true
|
1304
|
-
|
1305
521
|
Style/IfWithSemicolon:
|
1306
522
|
Description: Do not use if x; .... Use the ternary operator instead.
|
1307
523
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs
|
1308
524
|
Enabled: true
|
1309
|
-
|
1310
|
-
|
1311
|
-
|
525
|
+
Layout/IndentationConsistency:
|
526
|
+
Description: Keep indentation straight.
|
527
|
+
Enabled: false
|
528
|
+
Layout/IndentationWidth:
|
529
|
+
Description: Use 2 spaces for indentation.
|
530
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
1312
531
|
Enabled: true
|
1313
|
-
|
532
|
+
Layout/IndentFirstArrayElement:
|
533
|
+
Description: Checks the indentation of the first element in an array literal.
|
534
|
+
Enabled: false
|
535
|
+
Layout/IndentFirstHashElement:
|
536
|
+
Description: Checks the indentation of the first key in a hash literal.
|
537
|
+
Enabled: false
|
1314
538
|
Style/InfiniteLoop:
|
1315
539
|
Description: Use Kernel#loop for infinite loops.
|
1316
540
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#infinite-loop
|
1317
541
|
Enabled: true
|
1318
|
-
|
1319
|
-
Style/InlineComment:
|
1320
|
-
Description: Avoid trailing inline comments.
|
1321
|
-
Enabled: false
|
1322
|
-
|
1323
|
-
Style/InverseMethods:
|
1324
|
-
Description: Use the inverse method instead of `!.method` if an inverse method is defined.
|
1325
|
-
Enabled: true
|
1326
|
-
|
1327
|
-
Style/ImplicitRuntimeError:
|
1328
|
-
Description: Use `raise` or `fail` with an explicit exception class and message, rather than just a message.
|
1329
|
-
Enabled: false
|
1330
|
-
|
1331
542
|
Style/Lambda:
|
1332
543
|
Description: Use the new lambda literal syntax for single-line blocks.
|
1333
544
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#lambda-multi-line
|
1334
545
|
Enabled: true
|
1335
|
-
|
1336
546
|
Style/LambdaCall:
|
1337
547
|
Description: Use lambda.call(...) instead of lambda.(...).
|
1338
548
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc-call
|
1339
549
|
Enabled: false
|
1340
|
-
|
550
|
+
Layout/LeadingCommentSpace:
|
551
|
+
Description: Comments should start with a space.
|
552
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-space
|
553
|
+
Enabled: true
|
1341
554
|
Style/LineEndConcatenation:
|
1342
|
-
Description: Use \ instead of + or << to concatenate two string literals at line
|
555
|
+
Description: Use \ instead of + or << to concatenate two string literals at line
|
556
|
+
end.
|
1343
557
|
Enabled: true
|
1344
|
-
|
1345
558
|
Style/MethodCallWithoutArgsParentheses:
|
1346
559
|
Description: Do not use parentheses for method calls with no arguments.
|
1347
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#
|
560
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-args-no-parens
|
1348
561
|
Enabled: true
|
1349
|
-
|
1350
|
-
Style/MethodCallWithArgsParentheses:
|
1351
|
-
Description: Use parentheses for method calls with arguments.
|
1352
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-invocation-parens
|
1353
|
-
Enabled: false
|
1354
|
-
|
1355
|
-
Style/MethodCalledOnDoEndBlock:
|
1356
|
-
Description: Avoid chaining a method call on a do...end block.
|
1357
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
|
1358
|
-
Enabled: false
|
1359
|
-
|
1360
562
|
Style/MethodDefParentheses:
|
1361
563
|
Description: Checks if the method definitions have or don't have parentheses.
|
1362
564
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
|
1363
565
|
Enabled: true
|
1364
|
-
|
1365
|
-
|
1366
|
-
|
1367
|
-
|
1368
|
-
Enabled: true
|
1369
|
-
|
1370
|
-
Style/MinMax:
|
1371
|
-
Description: Use `Enumerable#minmax` instead of `Enumerable#min` and `Enumerable#max` in conjunction.'
|
1372
|
-
Enabled: true
|
1373
|
-
|
1374
|
-
Style/MissingElse:
|
1375
|
-
Description: Require if/case expressions to have an else branches. If enabled, it is recommended that Style/UnlessElse and Style/EmptyElse be enabled. This will conflict with Style/EmptyElse if Style/EmptyElse is configured to style "both"
|
1376
|
-
Enabled: false
|
1377
|
-
EnforcedStyle: both
|
1378
|
-
SupportedStyles:
|
1379
|
-
- if
|
1380
|
-
- case
|
1381
|
-
- both
|
1382
|
-
|
1383
|
-
Style/MixinGrouping:
|
1384
|
-
Description: Checks for grouping of mixins in `class` and `module` bodies.
|
1385
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#mixin-grouping
|
1386
|
-
Enabled: true
|
1387
|
-
|
566
|
+
Naming/MethodName:
|
567
|
+
Description: Use the configured style when naming methods.
|
568
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
|
569
|
+
Enabled: false
|
1388
570
|
Style/ModuleFunction:
|
1389
571
|
Description: Checks for usage of `extend self` in modules.
|
1390
572
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
|
1391
573
|
Enabled: true
|
1392
|
-
|
1393
574
|
Style/MultilineBlockChain:
|
1394
575
|
Description: Avoid multi-line chains of blocks.
|
1395
576
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
|
1396
577
|
Enabled: false
|
1397
|
-
|
578
|
+
Layout/MultilineBlockLayout:
|
579
|
+
Description: Ensures newlines after multiline block do statements.
|
580
|
+
Enabled: true
|
1398
581
|
Style/MultilineIfThen:
|
1399
582
|
Description: Do not use then for multi-line if/unless.
|
1400
583
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-then
|
1401
584
|
Enabled: true
|
1402
|
-
|
1403
|
-
|
1404
|
-
|
1405
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-if-modifiers
|
1406
|
-
Enabled: true
|
1407
|
-
|
1408
|
-
Style/MultilineMemoization:
|
1409
|
-
Description: Wrap multiline memoizations in a `begin` and `end` block.
|
1410
|
-
Enabled: true
|
1411
|
-
|
585
|
+
Layout/MultilineOperationIndentation:
|
586
|
+
Description: Checks indentation of binary operations that span more than one line.
|
587
|
+
Enabled: false
|
1412
588
|
Style/MultilineTernaryOperator:
|
1413
589
|
Description: 'Avoid multi-line ?: (the ternary operator); use if/unless instead.'
|
1414
590
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary
|
1415
591
|
Enabled: true
|
1416
|
-
|
1417
|
-
Style/MultipleComparison:
|
1418
|
-
Description: Avoid comparing a variable with multiple items in a conditional, use Array#include? instead.
|
1419
|
-
Enabled: true
|
1420
|
-
|
1421
|
-
Style/MutableConstant:
|
1422
|
-
Description: Do not assign mutable objects to constants.
|
1423
|
-
Enabled: true
|
1424
|
-
|
1425
592
|
Style/NegatedIf:
|
1426
593
|
Description: Favor unless over if for negative conditions (or control flow or).
|
1427
594
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#unless-for-negatives
|
1428
595
|
Enabled: true
|
1429
|
-
|
1430
596
|
Style/NegatedWhile:
|
1431
597
|
Description: Favor until over while for negative conditions.
|
1432
598
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#until-for-negatives
|
1433
599
|
Enabled: true
|
1434
|
-
|
1435
|
-
Style/NestedModifier:
|
1436
|
-
Description: Avoid using nested modifiers.
|
1437
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-modifiers
|
1438
|
-
Enabled: true
|
1439
|
-
|
1440
|
-
Style/NestedParenthesizedCalls:
|
1441
|
-
Description: Parenthesize method calls which are nested inside the argument list of another parenthesized method call.
|
1442
|
-
Enabled: true
|
1443
|
-
|
1444
600
|
Style/NestedTernaryOperator:
|
1445
601
|
Description: Use one expression per branch in a ternary operator.
|
1446
602
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-ternary
|
1447
603
|
Enabled: true
|
1448
|
-
|
1449
604
|
Style/Next:
|
1450
605
|
Description: Use `next` to skip iteration instead of a condition at the end.
|
1451
606
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
|
1452
607
|
Enabled: true
|
1453
|
-
|
1454
608
|
Style/NilComparison:
|
1455
|
-
Description:
|
1456
|
-
StyleGuide:
|
609
|
+
Description: Prefer x.nil? to x == nil.
|
610
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
|
1457
611
|
Enabled: true
|
1458
|
-
|
1459
612
|
Style/NonNilCheck:
|
1460
613
|
Description: Checks for redundant nil checks.
|
1461
614
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks
|
1462
615
|
Enabled: true
|
1463
|
-
|
1464
616
|
Style/Not:
|
1465
617
|
Description: Use ! instead of not.
|
1466
618
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bang-not-not
|
1467
619
|
Enabled: true
|
1468
|
-
|
1469
620
|
Style/NumericLiterals:
|
1470
621
|
Description: Add underscores to large numeric literals to improve their readability.
|
1471
622
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics
|
1472
623
|
Enabled: true
|
1473
|
-
|
1474
|
-
Style/NumericLiteralPrefix:
|
1475
|
-
Description: Use smallcase prefixes for numeric literals.
|
1476
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#numeric-literal-prefixes
|
1477
|
-
Enabled: true
|
1478
|
-
|
1479
|
-
Style/NumericPredicate:
|
1480
|
-
Description: Checks for the use of predicate- or comparison methods for numeric comparisons.
|
1481
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
|
1482
|
-
AutoCorrect: false
|
1483
|
-
Enabled: true
|
1484
|
-
|
1485
624
|
Style/OneLineConditional:
|
1486
625
|
Description: Favor the ternary operator(?:) over if/then/else/end constructs.
|
1487
626
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
|
1488
627
|
Enabled: false
|
1489
|
-
|
1490
628
|
Style/OptionalArguments:
|
1491
|
-
Description: Checks for optional arguments that do not appear at the end of the
|
629
|
+
Description: Checks for optional arguments that do not appear at the end of the
|
630
|
+
argument list
|
1492
631
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#optional-arguments
|
1493
632
|
Enabled: false
|
1494
|
-
|
1495
|
-
Style/OptionHash:
|
1496
|
-
Description: Don't use option hashes when you can use keyword arguments.
|
1497
|
-
Enabled: false
|
1498
|
-
|
1499
|
-
Style/OrAssignment:
|
1500
|
-
Description: Recommend usage of double pipe equals (||=) where applicable.
|
1501
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-pipe-for-uninit
|
1502
|
-
Enabled: true
|
1503
|
-
|
1504
633
|
Style/ParallelAssignment:
|
1505
|
-
Description: Check for simple usages of parallel assignment. It will only warn when
|
634
|
+
Description: Check for simple usages of parallel assignment. It will only warn when
|
635
|
+
the number of variables matches on both sides of the assignment. This also provides
|
636
|
+
performance benefits
|
1506
637
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parallel-assignment
|
1507
638
|
Enabled: false
|
1508
|
-
|
1509
639
|
Style/ParenthesesAroundCondition:
|
1510
640
|
Description: Don't use parentheses around the condition of an if/unless/while.
|
1511
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-parens-
|
641
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-parens-if
|
1512
642
|
Enabled: true
|
1513
|
-
|
1514
643
|
Style/PercentLiteralDelimiters:
|
1515
644
|
Description: Use `%`-literal delimiters consistently
|
1516
645
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
|
1517
646
|
Enabled: true
|
1518
|
-
|
647
|
+
PreferredDelimiters:
|
648
|
+
default: "()"
|
649
|
+
"%i": "()"
|
650
|
+
"%I": "()"
|
651
|
+
"%r": "{}"
|
652
|
+
"%w": "()"
|
653
|
+
"%W": "()"
|
1519
654
|
Style/PercentQLiterals:
|
1520
655
|
Description: Checks if uses of %Q/%q match the configured preference.
|
1521
656
|
Enabled: true
|
1522
|
-
|
1523
657
|
Style/PerlBackrefs:
|
1524
658
|
Description: Avoid Perl-style regex back references.
|
1525
659
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
|
1526
660
|
Enabled: false
|
1527
|
-
|
1528
|
-
|
1529
|
-
|
1530
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-key
|
661
|
+
Naming/PredicateName:
|
662
|
+
Description: Check the names of predicate methods.
|
663
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
|
1531
664
|
Enabled: true
|
1532
|
-
|
1533
665
|
Style/Proc:
|
1534
666
|
Description: Use proc instead of Proc.new.
|
1535
667
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc
|
1536
668
|
Enabled: true
|
1537
|
-
|
1538
669
|
Style/RaiseArgs:
|
1539
670
|
Description: Checks the arguments passed to raise/fail.
|
1540
671
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
|
1541
672
|
Enabled: false
|
1542
|
-
|
1543
673
|
Style/RedundantBegin:
|
1544
674
|
Description: Don't use begin blocks when they are not needed.
|
1545
675
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#begin-implicit
|
1546
676
|
Enabled: true
|
1547
|
-
|
1548
|
-
Style/RedundantConditional:
|
1549
|
-
Description: Don't return true/false from a conditional.
|
1550
|
-
Enabled: true
|
1551
|
-
|
1552
677
|
Style/RedundantException:
|
1553
678
|
Description: Checks for an obsolete RuntimeException argument in raise/fail.
|
1554
679
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror
|
1555
680
|
Enabled: true
|
1556
|
-
|
1557
|
-
Style/RedundantFreeze:
|
1558
|
-
Description: Checks usages of Object#freeze on immutable objects.
|
1559
|
-
Enabled: true
|
1560
|
-
|
1561
|
-
Style/RedundantParentheses:
|
1562
|
-
Description: Checks for parentheses that seem not to serve any purpose.
|
1563
|
-
Enabled: true
|
1564
|
-
|
1565
681
|
Style/RedundantReturn:
|
1566
682
|
Description: Don't use return where it's not required.
|
1567
683
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-return
|
1568
684
|
Enabled: true
|
1569
|
-
|
1570
685
|
Style/RedundantSelf:
|
1571
686
|
Description: Don't use self where it's not needed.
|
1572
687
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-self-unless-required
|
1573
688
|
Enabled: true
|
1574
|
-
|
1575
689
|
Style/RegexpLiteral:
|
1576
690
|
Description: Use / or %r around regular expressions.
|
1577
691
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-r
|
1578
692
|
Enabled: false
|
1579
|
-
|
693
|
+
Layout/RescueEnsureAlignment:
|
694
|
+
Description: Align rescues and ensures correctly.
|
695
|
+
Enabled: false
|
1580
696
|
Style/RescueModifier:
|
1581
697
|
Description: Avoid using rescue in its modifier form.
|
1582
698
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers
|
1583
699
|
Enabled: false
|
1584
|
-
|
1585
|
-
Style/ReturnNil:
|
1586
|
-
Description: Use return instead of return nil.
|
1587
|
-
Enabled: false
|
1588
|
-
|
1589
|
-
Style/SafeNavigation:
|
1590
|
-
Description: This cop transforms usages of a method call safeguarded by a check for the existance of the object to safe navigation (`&.`).
|
1591
|
-
Enabled: true
|
1592
|
-
|
1593
700
|
Style/SelfAssignment:
|
1594
|
-
Description: Checks for places where self-assignment shorthand should have been
|
701
|
+
Description: Checks for places where self-assignment shorthand should have been
|
702
|
+
used.
|
1595
703
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#self-assignment
|
1596
704
|
Enabled: true
|
1597
|
-
|
1598
705
|
Style/Semicolon:
|
1599
706
|
Description: Don't use semicolons to terminate expressions.
|
1600
707
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon
|
1601
708
|
Enabled: true
|
1602
|
-
|
1603
|
-
Style/Send:
|
1604
|
-
Description: Prefer `Object#__send__` or `Object#public_send` to `send`, as `send` may overlap with existing methods.
|
1605
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#prefer-public-send
|
1606
|
-
Enabled: false
|
1607
|
-
|
1608
709
|
Style/SignalException:
|
1609
710
|
Description: Checks for proper usage of fail and raise.
|
1610
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#
|
711
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
|
1611
712
|
Enabled: true
|
1612
|
-
|
1613
713
|
Style/SingleLineBlockParams:
|
1614
714
|
Description: Enforces the names of some block params.
|
1615
|
-
|
1616
|
-
|
715
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
|
716
|
+
Enabled: true
|
1617
717
|
Style/SingleLineMethods:
|
1618
718
|
Description: Avoid single-line methods.
|
1619
719
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
|
1620
720
|
Enabled: false
|
1621
|
-
|
721
|
+
Layout/SpaceBeforeFirstArg:
|
722
|
+
Description: Checks that exactly one space is used between a method name and the
|
723
|
+
first argument for method calls without parentheses.
|
724
|
+
Enabled: true
|
725
|
+
Layout/SpaceAfterColon:
|
726
|
+
Description: Use spaces after colons.
|
727
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
728
|
+
Enabled: true
|
729
|
+
Layout/SpaceAfterComma:
|
730
|
+
Description: Use spaces after commas.
|
731
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
732
|
+
Enabled: true
|
733
|
+
Layout/SpaceAroundKeyword:
|
734
|
+
Description: Use spaces around keywords.
|
735
|
+
Enabled: true
|
736
|
+
Layout/SpaceAfterMethodName:
|
737
|
+
Description: Do not put a space between a method name and the opening parenthesis
|
738
|
+
in a method definition.
|
739
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
|
740
|
+
Enabled: true
|
741
|
+
Layout/SpaceAfterNot:
|
742
|
+
Description: Tracks redundant space after the ! operator.
|
743
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-bang
|
744
|
+
Enabled: false
|
745
|
+
Layout/SpaceAfterSemicolon:
|
746
|
+
Description: Use spaces after semicolons.
|
747
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
748
|
+
Enabled: true
|
749
|
+
Layout/SpaceBeforeBlockBraces:
|
750
|
+
Description: Checks that the left block brace has or doesn't have space before it.
|
751
|
+
Enabled: false
|
752
|
+
Layout/SpaceBeforeComma:
|
753
|
+
Description: No spaces before commas.
|
754
|
+
Enabled: false
|
755
|
+
Layout/SpaceBeforeComment:
|
756
|
+
Description: Checks for missing space between code and a comment on the same line.
|
757
|
+
Enabled: false
|
758
|
+
Layout/SpaceBeforeSemicolon:
|
759
|
+
Description: No spaces before semicolons.
|
760
|
+
Enabled: false
|
761
|
+
Layout/SpaceInsideBlockBraces:
|
762
|
+
Description: Checks that block braces have or don't have surrounding space. For
|
763
|
+
blocks taking parameters, checks that the left brace has or doesn't have trailing
|
764
|
+
space.
|
765
|
+
Enabled: false
|
766
|
+
Layout/SpaceAroundBlockParameters:
|
767
|
+
Description: Checks the spacing inside and after block parameters pipes.
|
768
|
+
Enabled: true
|
769
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
770
|
+
Description: Checks that the equals signs in parameter default assignments have
|
771
|
+
or don't have surrounding space depending on configuration.
|
772
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-around-equals
|
773
|
+
Enabled: true
|
774
|
+
Layout/SpaceAroundOperators:
|
775
|
+
Description: Use a single space around operators.
|
776
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
777
|
+
Enabled: true
|
778
|
+
Layout/SpaceInsideHashLiteralBraces:
|
779
|
+
Description: Use spaces inside hash literal braces - or don't.
|
780
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
781
|
+
Enabled: true
|
782
|
+
Layout/SpaceInsideParens:
|
783
|
+
Description: No spaces after ( or before ).
|
784
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
|
785
|
+
Enabled: true
|
786
|
+
Layout/SpaceInsideRangeLiteral:
|
787
|
+
Description: No spaces inside range literals.
|
788
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals
|
789
|
+
Enabled: true
|
790
|
+
Layout/SpaceInsideStringInterpolation:
|
791
|
+
Description: Checks for padding/surrounding spaces inside string interpolation.
|
792
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#string-interpolation
|
793
|
+
Enabled: false
|
1622
794
|
Style/SpecialGlobalVars:
|
1623
795
|
Description: Avoid Perl-style global variables.
|
1624
796
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
|
1625
797
|
Enabled: false
|
1626
|
-
|
1627
|
-
Style/StabbyLambdaParentheses:
|
1628
|
-
Description: Check for the usage of parentheses around stabby lambda arguments.
|
1629
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#stabby-lambda-with-args
|
1630
|
-
Enabled: true
|
1631
|
-
|
1632
|
-
Style/StderrPuts:
|
1633
|
-
Description: Use `warn` instead of `$stderr.puts`.
|
1634
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#warn
|
1635
|
-
Enabled: true
|
1636
|
-
|
1637
798
|
Style/StringLiterals:
|
1638
799
|
Description: Checks if uses of quotes match the configured preference.
|
1639
800
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
|
1640
801
|
EnforcedStyle: double_quotes
|
1641
802
|
Enabled: true
|
1642
|
-
|
1643
803
|
Style/StringLiteralsInInterpolation:
|
1644
|
-
Description: Checks if uses of quotes inside expressions in interpolated strings
|
804
|
+
Description: Checks if uses of quotes inside expressions in interpolated strings
|
805
|
+
match the configured preference.
|
1645
806
|
Enabled: true
|
1646
|
-
|
1647
|
-
Style/StringMethods:
|
1648
|
-
Description: Checks if configured preferred methods are used over non-preferred.
|
1649
|
-
Enabled: false
|
1650
|
-
|
1651
807
|
Style/StructInheritance:
|
1652
808
|
Description: Checks for inheritance from Struct.new.
|
1653
809
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new
|
1654
810
|
Enabled: false
|
1655
|
-
|
1656
|
-
Style/SymbolArray:
|
1657
|
-
Description: Use %i or %I for arrays of symbols.
|
1658
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-i
|
1659
|
-
Enabled: true
|
1660
|
-
|
1661
811
|
Style/SymbolLiteral:
|
1662
812
|
Description: Use plain symbols instead of string symbols when possible.
|
1663
813
|
Enabled: false
|
1664
|
-
|
1665
814
|
Style/SymbolProc:
|
1666
815
|
Description: Use symbols as procs instead of blocks when possible.
|
1667
816
|
Enabled: false
|
1668
|
-
|
1669
|
-
|
1670
|
-
|
1671
|
-
Enabled:
|
1672
|
-
|
1673
|
-
|
1674
|
-
|
1675
|
-
Enabled:
|
1676
|
-
|
817
|
+
Layout/Tab:
|
818
|
+
Description: No hard tabs.
|
819
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
820
|
+
Enabled: false
|
821
|
+
Layout/TrailingBlankLines:
|
822
|
+
Description: Checks trailing blank lines and final newline.
|
823
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#newline-eof
|
824
|
+
Enabled: false
|
1677
825
|
Style/TrailingCommaInArguments:
|
1678
|
-
Description: Checks for trailing comma in
|
1679
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-params-comma
|
826
|
+
Description: Checks for trailing comma in parameter lists.
|
827
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-params-comma
|
1680
828
|
Enabled: false
|
1681
|
-
|
1682
|
-
|
1683
|
-
|
1684
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
|
829
|
+
Layout/TrailingWhitespace:
|
830
|
+
Description: Avoid trailing whitespace.
|
831
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace
|
1685
832
|
Enabled: false
|
1686
|
-
|
1687
833
|
Style/TrivialAccessors:
|
1688
834
|
Description: Prefer attr_* methods to trivial readers/writers.
|
1689
835
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr_family
|
1690
836
|
Enabled: false
|
1691
|
-
|
1692
837
|
Style/UnlessElse:
|
1693
838
|
Description: Do not use unless with else. Rewrite these with the positive case first.
|
1694
839
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-else-with-unless
|
1695
840
|
Enabled: true
|
1696
|
-
|
1697
841
|
Style/UnneededCapitalW:
|
1698
842
|
Description: Checks for %W when interpolation is not needed.
|
1699
843
|
Enabled: false
|
1700
|
-
|
1701
|
-
Style/UnneededInterpolation:
|
1702
|
-
Description: Checks for strings that are just an interpolated expression.
|
1703
|
-
Enabled: true
|
1704
|
-
|
1705
844
|
Style/UnneededPercentQ:
|
1706
845
|
Description: Checks for %q/%Q when single quotes or double quotes would do.
|
1707
846
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q
|
1708
847
|
Enabled: false
|
1709
|
-
|
1710
848
|
Style/TrailingUnderscoreVariable:
|
1711
|
-
Description: Checks for the usage of unneeded trailing underscores at the end of
|
1712
|
-
|
849
|
+
Description: Checks for the usage of unneeded trailing underscores at the end of
|
850
|
+
parallel variable assignment.
|
1713
851
|
Enabled: false
|
1714
|
-
|
1715
852
|
Style/VariableInterpolation:
|
1716
|
-
Description: Don't interpolate global, instance and class variables directly in
|
853
|
+
Description: Don't interpolate global, instance and class variables directly in
|
854
|
+
strings.
|
1717
855
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
|
1718
856
|
Enabled: true
|
1719
|
-
|
857
|
+
Naming/VariableName:
|
858
|
+
Description: Use the configured style when naming variables.
|
859
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
|
860
|
+
Enabled: true
|
1720
861
|
Style/WhenThen:
|
1721
862
|
Description: Use when x then ... for one-line cases.
|
1722
863
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
|
1723
864
|
Enabled: true
|
1724
|
-
|
1725
865
|
Style/WhileUntilDo:
|
1726
866
|
Description: Checks for redundant do after while or until.
|
1727
867
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do
|
1728
868
|
Enabled: true
|
1729
|
-
|
1730
869
|
Style/WhileUntilModifier:
|
1731
870
|
Description: Favor modifier while/until usage when you have a single-line body.
|
1732
871
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier
|
1733
872
|
Enabled: true
|
1734
|
-
|
873
|
+
Style/MutableConstant:
|
874
|
+
Enabled: true
|
875
|
+
Style/FrozenStringLiteralComment:
|
876
|
+
Enabled: true
|
1735
877
|
Style/WordArray:
|
1736
878
|
Description: Use %w or %W for arrays of words.
|
1737
879
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-w
|
1738
880
|
Enabled: true
|
1739
|
-
|
1740
|
-
|
1741
|
-
|
1742
|
-
|
1743
|
-
Enabled: true
|
1744
|
-
|
1745
|
-
Style/ZeroLengthPredicate:
|
1746
|
-
Description: Use #empty? when testing for objects of length 0.
|
881
|
+
Style/EmptyMethod:
|
882
|
+
Enabled: false
|
883
|
+
Security/Eval:
|
884
|
+
Description: The use of eval represents a serious security risk.
|
1747
885
|
Enabled: true
|
886
|
+
Gemspec/RequiredRubyVersion:
|
887
|
+
Enabled: false
|