.rubocop.yml 24.9 KB
Newer Older
1 2 3
require:
  - rubocop-rspec
  - ./rubocop/rubocop
Robert Speicher's avatar
Robert Speicher committed
4

Z.J. van de Weg's avatar
Z.J. van de Weg committed
5 6
inherit_from: .rubocop_todo.yml

7
AllCops:
8
  TargetRubyVersion: 2.3
Z.J. van de Weg's avatar
Z.J. van de Weg committed
9
  # Cop names are not d§splayed in offense messages by default. Change behavior
10 11 12 13 14 15 16 17 18 19
  # by overriding DisplayCopNames, or by giving the -D/--display-cop-names
  # option.
  DisplayCopNames: true
  # Style guide URLs are not displayed in offense messages by default. Change
  # behavior by overriding DisplayStyleGuide, or by giving the
  # -S/--display-style-guide option.
  DisplayStyleGuide: false
  # Exclude some GitLab files
  Exclude:
    - 'vendor/**/*'
20
    - 'node_modules/**/*'
21 22
    - 'db/*'
    - 'db/fixtures/**/*'
23 24
    - 'tmp/**/*'
    - 'bin/**/*'
25
    - 'generator_templates/**/*'
26

Douwe Maan's avatar
Douwe Maan committed
27
# Gems in consecutive lines should be alphabetically sorted
Douwe Maan's avatar
Douwe Maan committed
28 29 30
Bundler/OrderedGems:
  Enabled: false

31
# Style #######################################################################
32 33

# Check indentation of private/protected visibility modifiers.
34
Style/AccessModifierIndentation:
35
  Enabled: true
36

37 38 39 40
# Check the naming of accessor methods for get_/set_.
Style/AccessorMethodName:
  Enabled: false

41
# Use alias_method instead of alias.
42
Style/Alias:
43
  EnforcedStyle: prefer_alias_method
44
  Enabled: true
45

46
# Align the elements of an array literal if they span more than one line.
47
Style/AlignArray:
48
  Enabled: true
49

50
# Align the elements of a hash literal if they span more than one line.
51
Style/AlignHash:
52
  Enabled: true
53

Douwe Maan's avatar
Douwe Maan committed
54 55
# Here we check if the parameters on a multi-line method call or
# definition are aligned.
Douwe Maan's avatar
Douwe Maan committed
56 57 58
Style/AlignParameters:
  Enabled: false

Douwe Maan's avatar
Douwe Maan committed
59 60 61 62 63
# Whether `and` and `or` are banned only in conditionals (conditionals)
# or completely (always).
Style/AndOr:
  Enabled: true

64
# Use `Array#join` instead of `Array#*`.
65
Style/ArrayJoin:
66
  Enabled: true
67

68
# Use only ascii symbols in comments.
69
Style/AsciiComments:
70
  Enabled: true
71

72
# Use only ascii symbols in identifiers.
73
Style/AsciiIdentifiers:
74
  Enabled: true
75

76
# Checks for uses of Module#attr.
77
Style/Attr:
78
  Enabled: true
79

80
# Avoid the use of BEGIN blocks.
81
Style/BeginBlock:
82
  Enabled: true
83

84
# Do not use block comments.
85
Style/BlockComments:
86
  Enabled: true
87

88 89
# Avoid using {...} for multi-line blocks (multiline chaining is # always
# ugly). Prefer {...} over do...end for single-line blocks.
90
Style/BlockDelimiters:
91
  Enabled: true
92

Douwe Maan's avatar
Douwe Maan committed
93 94 95 96
# Put end statement of multiline block on its own line.
Style/BlockEndNewline:
  Enabled: true

Douwe Maan's avatar
Douwe Maan committed
97 98
 # This cop checks for braces around the last parameter in a method call
# if the last parameter is a hash.
Douwe Maan's avatar
Douwe Maan committed
99 100 101
Style/BracesAroundHashParameters:
  Enabled: false

Douwe Maan's avatar
Douwe Maan committed
102
# This cop checks for uses of the case equality operator(===).
Douwe Maan's avatar
Douwe Maan committed
103 104 105
Style/CaseEquality:
  Enabled: false

106
# Indentation of when in a case/when/[else/]end.
107
Style/CaseIndentation:
108
  Enabled: true
109

110
# Checks for uses of character literals.
111
Style/CharacterLiteral:
112
  Enabled: true
113

114
# Use CamelCase for classes and modules.'
115
Style/ClassAndModuleCamelCase:
116
  Enabled: true
117

118
# Checks style of children classes and modules.
119 120 121
Style/ClassAndModuleChildren:
  Enabled: false

122
# Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.
123
Style/ClassCheck:
Douwe Maan's avatar
Douwe Maan committed
124
  Enabled: true
125

126
# Use self when defining module/class methods.
127
Style/ClassMethods:
128
  Enabled: true
129

130
# Avoid the use of class variables.
131
Style/ClassVars:
132
  Enabled: true
133

Douwe Maan's avatar
Douwe Maan committed
134 135
# This cop checks for methods invoked via the :: operator instead
# of the . operator (like FileUtils::rmdir instead of FileUtils.rmdir).
Douwe Maan's avatar
Douwe Maan committed
136 137 138
Style/ColonMethodCall:
  Enabled: true

Douwe Maan's avatar
Douwe Maan committed
139 140
# This cop checks that comment annotation keywords are written according
# to guidelines.
Douwe Maan's avatar
Douwe Maan committed
141 142 143
Style/CommentAnnotation:
  Enabled: false

144
# Indentation of comments.
145
Style/CommentIndentation:
146
  Enabled: true
147

Douwe Maan's avatar
Douwe Maan committed
148 149 150
# Check for `if` and `case` statements where each branch is used for
# assignment to the same variable when using the return of the
# condition can be used instead.
Douwe Maan's avatar
Douwe Maan committed
151 152 153
Style/ConditionalAssignment:
  Enabled: true

154
# Constants should use SCREAMING_SNAKE_CASE.
155
Style/ConstantName:
156
  Enabled: true
157

158
# Use def with parentheses when there are arguments.
159
Style/DefWithParentheses:
160
  Enabled: true
161

162
# Document classes and non-namespace modules.
163 164 165
Style/Documentation:
  Enabled: false

Douwe Maan's avatar
Douwe Maan committed
166 167 168
# This cop checks for uses of double negation (!!) to convert something
# to a boolean value. As this is both cryptic and usually redundant, it
# should be avoided.
Douwe Maan's avatar
Douwe Maan committed
169 170 171
Style/DoubleNegation:
  Enabled: false

172
# Align elses and elsifs correctly.
173
Style/ElseAlignment:
174
  Enabled: true
175

176
# Use empty lines between defs.
177
Style/EmptyLineBetweenDefs:
178
  Enabled: true
179

180
# Don't use several empty lines in a row.
181
Style/EmptyLines:
182
  Enabled: true
183

184
# Keep blank lines around access modifiers.
185
Style/EmptyLinesAroundAccessModifier:
186
  Enabled: true
187

188
# Keeps track of empty lines around block bodies.
189
Style/EmptyLinesAroundBlockBody:
190
  Enabled: true
191

192
# Keeps track of empty lines around class bodies.
193
Style/EmptyLinesAroundClassBody:
194
  Enabled: true
195

196
# Keeps track of empty lines around method bodies.
197
Style/EmptyLinesAroundMethodBody:
198
  Enabled: true
199

Douwe Maan's avatar
Douwe Maan committed
200 201 202 203
# Keeps track of empty lines around module bodies.
Style/EmptyLinesAroundModuleBody:
  Enabled: true

204
# Avoid the use of END blocks.
205
Style/EndBlock:
206
  Enabled: true
207

208
# Use Unix-style line endings.
209
Style/EndOfLine:
210
  Enabled: true
211

212
# Favor the use of Fixnum#even? && Fixnum#odd?
213
Style/EvenOdd:
214
  Enabled: true
215

216
# Use snake_case for source file names.
217
Style/FileName:
218 219 220
  Enabled: true

# Checks for a line break before the first parameter in a multi-line method
221
# parameter definition.
222 223
Style/FirstMethodParameterLineBreak:
  Enabled: true
224

225
# Checks for flip flops.
226
Style/FlipFlop:
227
  Enabled: true
228

229
# Checks use of for or each in multiline loops.
230
Style/For:
231
  Enabled: true
232

Z.J. van de Weg's avatar
Z.J. van de Weg committed
233 234 235
# Checks if there is a magic comment to enforce string literals
Style/FrozenStringLiteralComment:
  Enabled: false
236

237
# Do not introduce global variables.
238
Style/GlobalVars:
239
  Enabled: true
240 241 242
  Exclude:
    - 'lib/backup/**/*'
    - 'lib/tasks/**/*'
243

244 245
# Prefer Ruby 1.9 hash syntax `{ a: 1, b: 2 }`
# over 1.8 syntax `{ :a => 1, :b => 2 }`.
246
Style/HashSyntax:
247
  Enabled: true
248

249 250 251
# 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.
Style/IdenticalConditionalBranches:
252
  Enabled: true
253

Douwe Maan's avatar
Douwe Maan committed
254 255 256 257
# Do not use if x; .... Use the ternary operator instead.
Style/IfWithSemicolon:
  Enabled: true

258
# Checks the indentation of the first line of the right-hand-side of a
259
# multi-line assignment.
260
Style/IndentAssignment:
261
  Enabled: true
262 263

# Keep indentation straight.
264
Style/IndentationConsistency:
265
  Enabled: true
266

267
# Use 2 spaces for indentation.
268
Style/IndentationWidth:
269
  Enabled: true
270

271
# Use Kernel#loop for infinite loops.
272
Style/InfiniteLoop:
273
  Enabled: true
274

275
# Use lambda.call(...) instead of lambda.(...).
276
Style/LambdaCall:
277
  Enabled: true
278

279
# Comments should start with a space.
280
Style/LeadingCommentSpace:
Felipe's avatar
Felipe committed
281
  Enabled: true
282

283
# Checks if the method definitions have or don't have parentheses.
284
Style/MethodDefParentheses:
285
  Enabled: true
286

287
# Use the configured style when naming methods.
288
Style/MethodName:
289
  Enabled: true
290

291 292 293 294
# Checks for usage of `extend self` in modules.
Style/ModuleFunction:
  Enabled: false

Robert Speicher's avatar
Robert Speicher committed
295 296 297
# Checks that the closing brace in an array literal is either on the same line
# as the last array element, or a new line.
Style/MultilineArrayBraceLayout:
298
  Enabled: true
Robert Speicher's avatar
Robert Speicher committed
299 300
  EnforcedStyle: symmetrical

301
# Avoid multi-line chains of blocks.
302
Style/MultilineBlockChain:
303
  Enabled: true
304

305
# Ensures newlines after multiline block do statements.
306
Style/MultilineBlockLayout:
307
  Enabled: true
308

Robert Speicher's avatar
Robert Speicher committed
309 310 311
# Checks that the closing brace in a hash literal is either on the same line as
# the last hash element, or a new line.
Style/MultilineHashBraceLayout:
312
  Enabled: true
Robert Speicher's avatar
Robert Speicher committed
313 314
  EnforcedStyle: symmetrical

315
# Do not use then for multi-line if/unless.
316
Style/MultilineIfThen:
317
  Enabled: true
318

Robert Speicher's avatar
Robert Speicher committed
319 320 321 322 323 324
# Checks that the closing brace in a method call is either on the same line as
# the last method argument, or a new line.
Style/MultilineMethodCallBraceLayout:
  Enabled: false
  EnforcedStyle: symmetrical

325 326 327 328 329
# Checks indentation of method calls with the dot operator that span more than
# one line.
Style/MultilineMethodCallIndentation:
  Enabled: false

330 331 332 333 334
# Checks that the closing brace in a method definition is symmetrical with
# respect to the opening brace and the method parameters.
Style/MultilineMethodDefinitionBraceLayout:
  Enabled: false

335
# Checks indentation of binary operations that span more than one line.
336
Style/MultilineOperationIndentation:
337 338
  Enabled: true
  EnforcedStyle: indented
339

340 341 342 343
# Avoid multi-line `? :` (the ternary operator), use if/unless instead.
Style/MultilineTernaryOperator:
  Enabled: true

Douwe Maan's avatar
Douwe Maan committed
344 345
# This cop checks whether some constant value isn't a
# mutable literal (e.g. array or hash).
Douwe Maan's avatar
Douwe Maan committed
346 347
Style/MutableConstant:
  Enabled: true
348 349 350
  Exclude:
    - 'db/migrate/**/*'
    - 'db/post_migrate/**/*'
Douwe Maan's avatar
Douwe Maan committed
351

352
# Favor unless over if for negative conditions (or control flow or).
353
Style/NegatedIf:
354
  Enabled: true
355

356 357
# Avoid using nested modifiers.
Style/NestedModifier:
358
  Enabled: true
359 360

# Use one expression per branch in a ternary operator.
361
Style/NestedTernaryOperator:
362
  Enabled: true
363

364
# Prefer x.nil? to x == nil.
365
Style/NilComparison:
366
  Enabled: true
367

368
# Checks for redundant nil checks.
369
Style/NonNilCheck:
370
  Enabled: true
371

372
# Use ! instead of not.
373
Style/Not:
374
  Enabled: true
375

376
# Add underscores to large numeric literals to improve their readability.
377 378 379
Style/NumericLiterals:
  Enabled: false

380
# Favor the ternary operator(?:) over if/then/else/end constructs.
381
Style/OneLineConditional:
382
  Enabled: true
383

384
# When defining binary operators, name the argument other.
385
Style/OpMethod:
386
  Enabled: true
387

388
# Don't use parentheses around the condition of an if/unless/while.
389
Style/ParenthesesAroundCondition:
390
  Enabled: true
391

392 393 394 395
# Checks for an obsolete RuntimeException argument in raise/fail.
Style/RedundantException:
  Enabled: true

396 397
# Checks for parentheses that seem not to serve any purpose.
Style/RedundantParentheses:
398
  Enabled: true
399 400

# Don't use semicolons to terminate expressions.
401
Style/Semicolon:
402
  Enabled: true
403

404
# Checks for proper usage of fail and raise.
405
Style/SignalException:
406 407
  EnforcedStyle: only_raise
  Enabled: true
408

409
# Use spaces after colons.
410
Style/SpaceAfterColon:
411
  Enabled: true
412

413
# Use spaces after commas.
414
Style/SpaceAfterComma:
415
  Enabled: true
416

417 418
# Do not put a space between a method name and the opening parenthesis in a
# method definition.
419
Style/SpaceAfterMethodName:
420
  Enabled: true
421

422
# Tracks redundant space after the ! operator.
423
Style/SpaceAfterNot:
424
  Enabled: true
425

426
# Use spaces after semicolons.
427
Style/SpaceAfterSemicolon:
428
  Enabled: true
429

430 431 432 433
# Use space around equals in parameter default
Style/SpaceAroundEqualsInParameterDefault:
  Enabled: true

434 435
# Use a space around keywords if appropriate.
Style/SpaceAroundKeyword:
436
  Enabled: true
437

438 439
# Use a single space around operators.
Style/SpaceAroundOperators:
440
  Enabled: true
441

442 443
# No spaces before commas.
Style/SpaceBeforeComma:
444
  Enabled: true
445

446 447
# Checks for missing space between code and a comment on the same line.
Style/SpaceBeforeComment:
448
  Enabled: true
449

450 451
# No spaces before semicolons.
Style/SpaceBeforeSemicolon:
452
  Enabled: true
453

Douwe Maan's avatar
Douwe Maan committed
454
# Checks for spaces inside square brackets.
455 456 457
Style/SpaceInsideBrackets:
  Enabled: true

458
# Use spaces inside hash literal braces - or don't.
459
Style/SpaceInsideHashLiteralBraces:
460
  Enabled: true
461

462
# No spaces inside range literals.
463
Style/SpaceInsideRangeLiteral:
464
  Enabled: true
465

466 467
# Checks for padding/surrounding spaces inside string interpolation.
Style/SpaceInsideStringInterpolation:
468 469
  EnforcedStyle: no_space
  Enabled: true
470 471 472

# Check for the usage of parentheses around stabby lambda arguments.
Style/StabbyLambdaParentheses:
473 474
  EnforcedStyle: require_parentheses
  Enabled: true
475 476

# Checks if uses of quotes match the configured preference.
477 478 479
Style/StringLiterals:
  Enabled: false

480 481
# Checks if configured preferred methods are used over non-preferred.
Style/StringMethods:
482 483 484
  PreferredMethods:
    intern: to_sym
  Enabled: true
485 486

# No hard tabs.
487
Style/Tab:
Dmytro Zaporozhets's avatar
Dmytro Zaporozhets committed
488
  Enabled: true
489

490
# Checks trailing blank lines and final newline.
491
Style/TrailingBlankLines:
492
  Enabled: true
493

Douwe Maan's avatar
Douwe Maan committed
494
# This cop checks for trailing comma in array and hash literals.
495 496 497
Style/TrailingCommaInLiteral:
  Enabled: false

498
# Checks for %W when interpolation is not needed.
499
Style/UnneededCapitalW:
500
  Enabled: true
501

502
# Checks for %q/%Q when single quotes or double quotes would do.
503 504 505
Style/UnneededPercentQ:
  Enabled: false

506
# Don't interpolate global, instance and class variables directly in strings.
507
Style/VariableInterpolation:
508
  Enabled: true
509

510
# Use the configured style when naming variables.
511
Style/VariableName:
512 513
  EnforcedStyle: snake_case
  Enabled: true
514

515 516 517 518
# Use the configured style when numbering variables.
Style/VariableNumber:
  Enabled: false

519
# Use when x then ... for one-line cases.
520
Style/WhenThen:
521
  Enabled: true
522

523
# Checks for redundant do after while or until.
524
Style/WhileUntilDo:
525
  Enabled: true
526

527
# Favor modifier while/until usage when you have a single-line body.
528
Style/WhileUntilModifier:
529
  Enabled: true
530

531
# Use %w or %W for arrays of words.
532
Style/WordArray:
Douwe Maan's avatar
Douwe Maan committed
533
  Enabled: true
534

535
# Metrics #####################################################################
536

537 538
# A calculated magnitude based on number of assignments,
# branches, and conditions.
539
Metrics/AbcSize:
Grzegorz Bizon's avatar
Grzegorz Bizon committed
540
  Enabled: true
541
  Max: 60
Grzegorz Bizon's avatar
Grzegorz Bizon committed
542

Douwe Maan's avatar
Douwe Maan committed
543
# This cop checks if the length of a block exceeds some maximum value.
Douwe Maan's avatar
Douwe Maan committed
544 545 546
Metrics/BlockLength:
  Enabled: false

547
# Avoid excessive block nesting.
548
Metrics/BlockNesting:
Grzegorz Bizon's avatar
Grzegorz Bizon committed
549 550
  Enabled: true
  Max: 4
551

552
# Avoid classes longer than 100 lines of code.
553 554 555
Metrics/ClassLength:
  Enabled: false

556 557 558 559 560 561 562
# A complexity metric that is strongly correlated to the number
# of test cases needed to validate a method.
Metrics/CyclomaticComplexity:
  Enabled: true
  Max: 17

# Limit lines to 80 characters.
563 564 565
Metrics/LineLength:
  Enabled: false

566
# Avoid methods longer than 10 lines of code.
567 568 569
Metrics/MethodLength:
  Enabled: false

570
# Avoid modules longer than 100 lines of code.
571 572 573
Metrics/ModuleLength:
  Enabled: false

574 575 576 577 578 579 580 581
# Avoid parameter lists longer than three or four parameters.
Metrics/ParameterLists:
  Enabled: true
  Max: 8

# A complexity metric geared towards measuring complexity for a human reader.
Metrics/PerceivedComplexity:
  Enabled: true
582
  Max: 18
583

584
# Lint ########################################################################
585

586 587
# Checks for ambiguous operators in the first argument of a method invocation
# without parentheses.
588
Lint/AmbiguousOperator:
589
  Enabled: true
590

Douwe Maan's avatar
Douwe Maan committed
591 592
# This cop checks for ambiguous regexp literals in the first argument of
# a method invocation without parentheses.
Douwe Maan's avatar
Douwe Maan committed
593 594 595
Lint/AmbiguousRegexpLiteral:
  Enabled: false

Douwe Maan's avatar
Douwe Maan committed
596 597
# This cop checks for assignments in the conditions of
# if/while/until.
Douwe Maan's avatar
Douwe Maan committed
598 599 600
Lint/AssignmentInCondition:
  Enabled: false

601
# Align block ends correctly.
602
Lint/BlockAlignment:
603
  Enabled: true
604

605 606 607
# Default values in optional keyword arguments and optional ordinal arguments
# should not refer back to the name of the argument.
Lint/CircularArgumentReference:
608
  Enabled: true
609 610

# Checks for condition placed in a confusing position relative to the keyword.
611
Lint/ConditionPosition:
612
  Enabled: true
613

614
# Check for debugger calls.
615
Lint/Debugger:
616
  Enabled: true
617

618
# Align ends corresponding to defs correctly.
619
Lint/DefEndAlignment:
620
  Enabled: true
621

622
# Check for deprecated class method calls.
623
Lint/DeprecatedClassMethods:
624
  Enabled: true
625

626 627
# Check for immutable argument given to each_with_object.
Lint/EachWithObjectArgument:
628
  Enabled: true
629 630

# Check for odd code arrangement in an else block.
631
Lint/ElseLayout:
632
  Enabled: true
633

634
# Checks for empty ensure block.
635
Lint/EmptyEnsure:
636
  Enabled: true
637

638 639 640 641
# Checks for the presence of `when` branches without a body.
Lint/EmptyWhen:
  Enabled: true

642
# Align ends correctly.
643
Lint/EndAlignment:
644
  Enabled: true
645

646
# END blocks should not be placed inside method definitions.
647
Lint/EndInMethod:
648
  Enabled: true
649

650
# Do not use return in an ensure block.
651
Lint/EnsureReturn:
652
  Enabled: true
653

654 655
# Catches floating-point literals too large or small for Ruby to represent.
Lint/FloatOutOfRange:
656
  Enabled: true
657 658 659

# The number of parameters to format/sprint must match the fields.
Lint/FormatParameterMismatch:
660
  Enabled: true
661

Douwe Maan's avatar
Douwe Maan committed
662
# This cop checks for *rescue* blocks with no body.
Douwe Maan's avatar
Douwe Maan committed
663 664 665
Lint/HandleExceptions:
  Enabled: false

666 667 668
# Checks for adjacent string literals on the same line, which could better be
# represented as a single string literal.
Lint/ImplicitStringConcatenation:
669
  Enabled: true
670

Douwe Maan's avatar
Douwe Maan committed
671 672 673 674 675
# Checks for attempts to use `private` or `protected` to set the visibility
# of a class method, which does not work.
Lint/IneffectiveAccessModifier:
  Enabled: false

676 677
# Checks for invalid character literals with a non-escaped whitespace
# character.
678
Lint/InvalidCharacterLiteral:
679
  Enabled: true
680

681
# Checks of literals used in conditions.
682
Lint/LiteralInCondition:
683
  Enabled: true
684

685
# Checks for literals used in interpolation.
686
Lint/LiteralInInterpolation:
687
  Enabled: true
688

Douwe Maan's avatar
Douwe Maan committed
689
# This cop checks for uses of *begin...end while/until something*.
Douwe Maan's avatar
Douwe Maan committed
690 691 692
Lint/Loop:
  Enabled: false

693 694
# Do not use nested method definitions.
Lint/NestedMethodDefinition:
695
  Enabled: true
696 697 698

# Do not omit the accumulator when calling `next` in a `reduce`/`inject` block.
Lint/NextWithoutAccumulator:
699
  Enabled: true
700 701

# Checks for method calls with a space before the opening parenthesis.
702
Lint/ParenthesesAsGroupedExpression:
703
  Enabled: true
704

705 706 707
# Checks for `rand(1)` calls. Such calls always return `0` and most likely
# a mistake.
Lint/RandOne:
708
  Enabled: true
709 710

# Use parentheses in the method call to avoid confusion about precedence.
711
Lint/RequireParentheses:
712
  Enabled: true
713

714
# Avoid rescuing the Exception class.
715
Lint/RescueException:
716
  Enabled: true
717

Connor Shea's avatar
Connor Shea committed
718 719
# Checks for the order which exceptions are rescued to avoid rescueing a less specific exception before a more specific exception.
Lint/ShadowedException:
720 721
  Enabled: false

Douwe Maan's avatar
Douwe Maan committed
722 723
# This cop looks for use of the same name as outer local variables
# for block arguments or block local variables.
Douwe Maan's avatar
Douwe Maan committed
724 725 726
Lint/ShadowingOuterLocalVariable:
  Enabled: false

727 728 729 730
# Checks for Object#to_s usage in string interpolation.
Lint/StringConversionInInterpolation:
  Enabled: true

731
# Do not use prefix `_` for a variable that is used.
732
Lint/UnderscorePrefixedVariableName:
733
  Enabled: true
734

Douwe Maan's avatar
Douwe Maan committed
735
# This cop checks for using Fixnum or Bignum constant
Douwe Maan's avatar
Douwe Maan committed
736 737 738
Lint/UnifiedInteger:
  Enabled: true

739 740 741 742 743 744
# Checks for rubocop:disable comments that can be removed.
# Note: this cop is not disabled when disabling all cops.
# It must be explicitly disabled.
Lint/UnneededDisable:
  Enabled: false

Douwe Maan's avatar
Douwe Maan committed
745
# This cop checks for unneeded usages of splat expansion
Douwe Maan's avatar
Douwe Maan committed
746 747 748
Lint/UnneededSplatExpansion:
  Enabled: false

749
# Unreachable code.
750
Lint/UnreachableCode:
751
  Enabled: true
752

Douwe Maan's avatar
Douwe Maan committed
753
# This cop checks for unused block arguments.
Douwe Maan's avatar
Douwe Maan committed
754 755 756
Lint/UnusedBlockArgument:
  Enabled: false

Douwe Maan's avatar
Douwe Maan committed
757
# This cop checks for unused method arguments.
758 759 760
Lint/UnusedMethodArgument:
  Enabled: false

Douwe Maan's avatar
Douwe Maan committed
761 762 763 764
# Checks for useless access modifiers.
Lint/UselessAccessModifier:
  Enabled: true

765
# Checks for useless assignment to a local variable.
766
Lint/UselessAssignment:
767
  Enabled: true
768

769
# Checks for comparison of something with itself.
770
Lint/UselessComparison:
771
  Enabled: true
772

773
# Checks for useless `else` in `begin..end` without `rescue`.
774
Lint/UselessElseWithoutRescue:
775
  Enabled: true
776

777
# Checks for useless setter call to a local variable.
778
Lint/UselessSetterCall:
779
  Enabled: true