redi_search 1.0.2 → 1.0.3

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