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