GitLab steht Mittwoch, den 08. Juli, zwischen 09:00 und 13:00 Uhr aufgrund von Wartungsarbeiten nicht zur Verfügung.

.rubocop.yml 27.2 KB
Newer Older
Robert Speicher's avatar
Robert Speicher committed
1 2
require: rubocop-rspec

3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
AllCops:
  TargetRubyVersion: 2.1
  # Cop names are not displayed in offense messages by default. Change behavior
  # 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/**/*'
    - 'db/**/*'
    - 'tmp/**/*'
    - 'bin/**/*'
    - 'lib/backup/**/*'
    - 'lib/ci/backup/**/*'
    - 'lib/tasks/**/*'
    - 'lib/ci/migrate/**/*'
    - 'lib/email_validator.rb'
    - 'lib/gitlab/upgrader.rb'
    - 'lib/gitlab/seeder.rb'
26
    - 'generator_templates/**/*'
27 28 29 30 31


##################### Style ##################################

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

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

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

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

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

52
# Align the parameters of a method call if they span more than one line.
53
Style/AlignParameters:
54
  Enabled: false
55

56
# Use &&/|| instead of and/or.
57
Style/AndOr:
58
  Enabled: false
59

60
# Use `Array#join` instead of `Array#*`.
61
Style/ArrayJoin:
62
  Enabled: true
63

64
# Use only ascii symbols in comments.
65
Style/AsciiComments:
66
  Enabled: true
67

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

72
# Checks for uses of Module#attr.
73
Style/Attr:
74
  Enabled: true
75

76
# Avoid the use of BEGIN blocks.
77
Style/BeginBlock:
78
  Enabled: true
79

80
# Checks if usage of %() or %Q() matches configuration.
81 82 83
Style/BarePercentLiterals:
  Enabled: false

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

88
# Put end statement of multiline block on its own line.
89
Style/BlockEndNewline:
90
  Enabled: true
91

92 93
# Avoid using {...} for multi-line blocks (multiline chaining is # always
# ugly). Prefer {...} over do...end for single-line blocks.
94
Style/BlockDelimiters:
95
  Enabled: true
96

97
# Enforce braces style around hash parameters.
98 99 100
Style/BracesAroundHashParameters:
  Enabled: false

101
# Avoid explicit use of the case equality operator(===).
102 103 104
Style/CaseEquality:
  Enabled: false

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

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

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

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

121
# Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.
122 123 124
Style/ClassCheck:
  Enabled: false

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

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

133
# Do not use :: for method call.
134 135 136
Style/ColonMethodCall:
  Enabled: false

137
# Checks formatting of special comments (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
138 139 140
Style/CommentAnnotation:
  Enabled: false

141
# Indentation of comments.
142
Style/CommentIndentation:
143
  Enabled: true
144

145 146 147 148 149 150 151
# 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.
Style/ConditionalAssignment:
  Enabled: false

# Constants should use SCREAMING_SNAKE_CASE.
152
Style/ConstantName:
153
  Enabled: true
154

155
# Use def with parentheses when there are arguments.
156
Style/DefWithParentheses:
157
  Enabled: true
158

159
# Checks for use of deprecated Hash methods.
160 161 162
Style/DeprecatedHashMethods:
  Enabled: false

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

167
# Checks the position of the dot in multi-line method calls.
168 169 170
Style/DotPosition:
  Enabled: false

171
# Checks for uses of double negation (!!).
172 173 174
Style/DoubleNegation:
  Enabled: false

175
# Prefer `each_with_object` over `inject` or `reduce`.
176 177 178
Style/EachWithObject:
  Enabled: false

179
# Align elses and elsifs correctly.
180
Style/ElseAlignment:
181
  Enabled: true
182

183
# Avoid empty else-clauses.
184 185 186
Style/EmptyElse:
  Enabled: false

187
# Use empty lines between defs.
188 189 190
Style/EmptyLineBetweenDefs:
  Enabled: false

191
# Don't use several empty lines in a row.
192 193 194
Style/EmptyLines:
  Enabled: false

195
# Keep blank lines around access modifiers.
196 197 198
Style/EmptyLinesAroundAccessModifier:
  Enabled: false

199
# Keeps track of empty lines around block bodies.
200 201 202
Style/EmptyLinesAroundBlockBody:
  Enabled: false

203
# Keeps track of empty lines around class bodies.
204 205 206
Style/EmptyLinesAroundClassBody:
  Enabled: false

207
# Keeps track of empty lines around module bodies.
208 209 210
Style/EmptyLinesAroundModuleBody:
  Enabled: false

211
# Keeps track of empty lines around method bodies.
212 213 214
Style/EmptyLinesAroundMethodBody:
  Enabled: false

215
# Prefer literals to Array.new/Hash.new/String.new.
216 217 218
Style/EmptyLiteral:
  Enabled: false

219
# Avoid the use of END blocks.
220
Style/EndBlock:
221
  Enabled: true
222

223
# Use Unix-style line endings.
224
Style/EndOfLine:
225
  Enabled: true
226

227
# Favor the use of Fixnum#even? && Fixnum#odd?
228
Style/EvenOdd:
229
  Enabled: true
230

231
# Do not use unnecessary spacing.
232 233 234
Style/ExtraSpacing:
  Enabled: false

235
# Use snake_case for source file names.
236
Style/FileName:
237 238 239
  Enabled: true

# Checks for a line break before the first parameter in a multi-line method
240
# parameter definition.
241 242
Style/FirstMethodParameterLineBreak:
  Enabled: true
243

244
# Checks for flip flops.
245
Style/FlipFlop:
246
  Enabled: true
247

248
# Checks use of for or each in multiline loops.
249
Style/For:
250
  Enabled: true
251

252
# Enforce the use of Kernel#sprintf, Kernel#format or String#%.
253 254 255
Style/FormatString:
  Enabled: false

256
# Do not introduce global variables.
257
Style/GlobalVars:
258
  Enabled: true
259

260
# Check for conditionals that can be replaced with guard clauses.
261 262 263
Style/GuardClause:
  Enabled: false

264 265
# Prefer Ruby 1.9 hash syntax `{ a: 1, b: 2 }`
# over 1.8 syntax `{ :a => 1, :b => 2 }`.
266
Style/HashSyntax:
267
  Enabled: true
268

269 270 271 272 273
# Finds if nodes inside else, which can be converted to elsif.
Style/IfInsideElse:
  Enabled: false

# Favor modifier if/unless usage when you have a single-line body.
274 275 276
Style/IfUnlessModifier:
  Enabled: false

277
# Do not use if x; .... Use the ternary operator instead.
278
Style/IfWithSemicolon:
279
  Enabled: true
280

281 282 283 284 285 286
# 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:
  Enabled: false

# Checks the indentation of the first line of the right-hand-side of a
287
# multi-line assignment.
288
Style/IndentAssignment:
289
  Enabled: true
290 291

# Keep indentation straight.
292
Style/IndentationConsistency:
293
  Enabled: true
294

295
# Use 2 spaces for indentation.
296
Style/IndentationWidth:
297
  Enabled: true
298

299
# Checks the indentation of the first element in an array literal.
300 301 302
Style/IndentArray:
  Enabled: false

303
# Checks the indentation of the first key in a hash literal.
304 305 306
Style/IndentHash:
  Enabled: false

307
# Use Kernel#loop for infinite loops.
308
Style/InfiniteLoop:
309
  Enabled: true
310

311
# Use the new lambda literal syntax for single-line blocks.
312 313 314
Style/Lambda:
  Enabled: false

315
# Use lambda.call(...) instead of lambda.(...).
316
Style/LambdaCall:
317
  Enabled: true
318

319
# Comments should start with a space.
320
Style/LeadingCommentSpace:
Felipe Artur's avatar
Felipe Artur committed
321
  Enabled: true
322

323
# Use \ instead of + or << to concatenate two string literals at line end.
324 325 326
Style/LineEndConcatenation:
  Enabled: false

327
# Do not use parentheses for method calls with no arguments.
328 329 330
Style/MethodCallParentheses:
  Enabled: false

331
# Checks if the method definitions have or don't have parentheses.
332
Style/MethodDefParentheses:
333
  Enabled: true
334

335
# Use the configured style when naming methods.
336
Style/MethodName:
337
  Enabled: true
338

339
# Checks for usage of `extend self` in modules.
340 341 342
Style/ModuleFunction:
  Enabled: false

Robert Speicher's avatar
Robert Speicher committed
343 344 345 346 347 348
# 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:
  Enabled: false
  EnforcedStyle: symmetrical

349
# Avoid multi-line chains of blocks.
350 351 352
Style/MultilineBlockChain:
  Enabled: false

353
# Ensures newlines after multiline block do statements.
354
Style/MultilineBlockLayout:
355
  Enabled: true
356

Robert Speicher's avatar
Robert Speicher committed
357 358 359 360 361 362
# 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:
  Enabled: false
  EnforcedStyle: symmetrical

363
# Do not use then for multi-line if/unless.
364
Style/MultilineIfThen:
365
  Enabled: true
366

Robert Speicher's avatar
Robert Speicher committed
367 368 369 370 371 372
# 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

373 374 375 376 377
# Checks indentation of method calls with the dot operator that span more than
# one line.
Style/MultilineMethodCallIndentation:
  Enabled: false

378 379 380 381 382
# 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

383
# Checks indentation of binary operations that span more than one line.
384 385 386
Style/MultilineOperationIndentation:
  Enabled: false

387
# Avoid multi-line `? :` (the ternary operator), use if/unless instead.
388 389 390
Style/MultilineTernaryOperator:
  Enabled: false

391 392 393 394 395
# Do not assign mutable objects to constants.
Style/MutableConstant:
  Enabled: false

# Favor unless over if for negative conditions (or control flow or).
396
Style/NegatedIf:
397
  Enabled: true
398

399
# Favor until over while for negative conditions.
400 401 402
Style/NegatedWhile:
  Enabled: false

403 404
# Avoid using nested modifiers.
Style/NestedModifier:
405
  Enabled: true
406 407 408 409 410 411 412

# Parenthesize method calls which are nested inside the argument list of
# another parenthesized method call.
Style/NestedParenthesizedCalls:
  Enabled: false

# Use one expression per branch in a ternary operator.
413
Style/NestedTernaryOperator:
414
  Enabled: true
415

416
# Use `next` to skip iteration instead of a condition at the end.
417 418 419
Style/Next:
  Enabled: false

420
# Prefer x.nil? to x == nil.
421
Style/NilComparison:
422
  Enabled: true
423

424
# Checks for redundant nil checks.
425
Style/NonNilCheck:
426
  Enabled: true
427

428
# Use ! instead of not.
429
Style/Not:
430
  Enabled: true
431

432
# Add underscores to large numeric literals to improve their readability.
433 434 435
Style/NumericLiterals:
  Enabled: false

436
# Favor the ternary operator(?:) over if/then/else/end constructs.
437
Style/OneLineConditional:
438
  Enabled: true
439

440
# When defining binary operators, name the argument other.
441
Style/OpMethod:
442
  Enabled: true
443

444 445
# Check for simple usages of parallel assignment. It will only warn when
# the number of variables matches on both sides of the assignment.
446 447 448
Style/ParallelAssignment:
  Enabled: false

449
# Don't use parentheses around the condition of an if/unless/while.
450
Style/ParenthesesAroundCondition:
451
  Enabled: true
452

453
# Use `%`-literal delimiters consistently.
454 455 456
Style/PercentLiteralDelimiters:
  Enabled: false

457
# Checks if uses of %Q/%q match the configured preference.
458 459 460
Style/PercentQLiterals:
  Enabled: false

461
# Avoid Perl-style regex back references.
462 463 464
Style/PerlBackrefs:
  Enabled: false

465
# Check the names of predicate methods.
466 467 468
Style/PredicateName:
  Enabled: false

469
# Use proc instead of Proc.new.
470 471 472
Style/Proc:
  Enabled: false

473
# Checks the arguments passed to raise/fail.
474 475 476
Style/RaiseArgs:
  Enabled: false

477
# Don't use begin blocks when they are not needed.
478 479 480
Style/RedundantBegin:
  Enabled: false

481
# Checks for an obsolete RuntimeException argument in raise/fail.
482 483 484
Style/RedundantException:
  Enabled: false

485 486 487 488 489 490
# Checks usages of Object#freeze on immutable objects.
Style/RedundantFreeze:
  Enabled: false

# Checks for parentheses that seem not to serve any purpose.
Style/RedundantParentheses:
491
  Enabled: true
492 493

# Don't use return where it's not required.
494
Style/RedundantReturn:
495
  Enabled: true
496

497
# Don't use self where it's not needed.
498 499 500
Style/RedundantSelf:
  Enabled: false

501 502 503
# Use %r for regular expressions matching more than `MaxSlashes` '/'
# characters. Use %r only for regular expressions matching more
# than `MaxSlashes` '/' character.
504 505 506
Style/RegexpLiteral:
  Enabled: false

507
# Avoid using rescue in its modifier form.
508 509 510
Style/RescueModifier:
  Enabled: false

511
# Checks for places where self-assignment shorthand should have been used.
512 513 514
Style/SelfAssignment:
  Enabled: false

515
# Don't use semicolons to terminate expressions.
516
Style/Semicolon:
517
  Enabled: true
518

519
# Checks for proper usage of fail and raise.
520
Style/SignalException:
521 522
  EnforcedStyle: only_raise
  Enabled: true
523

524
# Enforces the names of some block params.
525 526 527
Style/SingleLineBlockParams:
  Enabled: false

528
# Avoid single-line methods.
529 530 531
Style/SingleLineMethods:
  Enabled: false

532
# Use spaces after colons.
533 534 535
Style/SpaceAfterColon:
  Enabled: false

536
# Use spaces after commas.
537 538 539
Style/SpaceAfterComma:
  Enabled: false

540 541
# Do not put a space between a method name and the opening parenthesis in a
# method definition.
542
Style/SpaceAfterMethodName:
543
  Enabled: true
544

545
# Tracks redundant space after the ! operator.
546
Style/SpaceAfterNot:
547
  Enabled: true
548

549
# Use spaces after semicolons.
550
Style/SpaceAfterSemicolon:
551
  Enabled: true
552

553 554 555
# Checks that the equals signs in parameter default assignments have or don't
# have surrounding space depending on configuration.
Style/SpaceAroundEqualsInParameterDefault:
556 557
  Enabled: false

558 559
# Use a space around keywords if appropriate.
Style/SpaceAroundKeyword:
560
  Enabled: true
561

562 563
# Use a single space around operators.
Style/SpaceAroundOperators:
564
  Enabled: true
565

566 567
# Checks that the left block brace has or doesn't have space before it.
Style/SpaceBeforeBlockBraces:
568 569
  Enabled: false

570 571
# No spaces before commas.
Style/SpaceBeforeComma:
572
  Enabled: true
573

574 575
# Checks for missing space between code and a comment on the same line.
Style/SpaceBeforeComment:
576
  Enabled: true
577

578 579 580 581 582 583 584
# Checks that exactly one space is used between a method name and the first
# argument for method calls without parentheses.
Style/SpaceBeforeFirstArg:
  Enabled: false

# No spaces before semicolons.
Style/SpaceBeforeSemicolon:
585
  Enabled: true
586

587 588 589 590
# 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.
Style/SpaceInsideBlockBraces:
591 592
  Enabled: false

593
# No spaces after [ or before ].
594 595 596
Style/SpaceInsideBrackets:
  Enabled: false

597
# Use spaces inside hash literal braces - or don't.
598
Style/SpaceInsideHashLiteralBraces:
599
  Enabled: true
600

601
# No spaces after ( or before ).
602 603 604
Style/SpaceInsideParens:
  Enabled: false

605
# No spaces inside range literals.
606
Style/SpaceInsideRangeLiteral:
607
  Enabled: true
608

609 610
# Checks for padding/surrounding spaces inside string interpolation.
Style/SpaceInsideStringInterpolation:
611 612
  EnforcedStyle: no_space
  Enabled: true
613 614

# Avoid Perl-style global variables.
615 616 617
Style/SpecialGlobalVars:
  Enabled: false

618 619
# Check for the usage of parentheses around stabby lambda arguments.
Style/StabbyLambdaParentheses:
620 621
  EnforcedStyle: require_parentheses
  Enabled: true
622 623

# Checks if uses of quotes match the configured preference.
624 625 626
Style/StringLiterals:
  Enabled: false

627 628
# Checks if uses of quotes inside expressions in interpolated strings match the
# configured preference.
629 630 631
Style/StringLiteralsInInterpolation:
  Enabled: false

632 633
# Checks if configured preferred methods are used over non-preferred.
Style/StringMethods:
634 635 636
  PreferredMethods:
    intern: to_sym
  Enabled: true
637 638 639 640 641 642

# Use %i or %I for arrays of symbols.
Style/SymbolArray:
  Enabled: false

# Use symbols as procs instead of blocks when possible.
643 644 645
Style/SymbolProc:
  Enabled: false

646
# No hard tabs.
647
Style/Tab:
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
648
  Enabled: true
649

650
# Checks trailing blank lines and final newline.
651
Style/TrailingBlankLines:
652
  Enabled: true
653

654 655
# Checks for trailing comma in array and hash literals.
Style/TrailingCommaInLiteral:
656 657
  Enabled: false

658 659 660 661 662
# Checks for trailing comma in argument lists.
Style/TrailingCommaInArguments:
  Enabled: false

# Avoid trailing whitespace.
663 664 665
Style/TrailingWhitespace:
  Enabled: false

666 667
# Checks for the usage of unneeded trailing underscores at the end of
# parallel variable assignment.
668 669 670
Style/TrailingUnderscoreVariable:
  Enabled: false

671
# Prefer attr_* methods to trivial readers/writers.
672 673 674
Style/TrivialAccessors:
  Enabled: false

675
# Do not use unless with else. Rewrite these with the positive case first.
676 677 678
Style/UnlessElse:
  Enabled: false

679
# Checks for %W when interpolation is not needed.
680 681 682
Style/UnneededCapitalW:
  Enabled: false

683 684 685 686 687 688
# TODO: Enable UnneededInterpolation Cop.
# Checks for strings that are just an interpolated expression.
Style/UnneededInterpolation:
  Enabled: false

# Checks for %q/%Q when single quotes or double quotes would do.
689 690 691
Style/UnneededPercentQ:
  Enabled: false

692
# Don't interpolate global, instance and class variables directly in strings.
693
Style/VariableInterpolation:
694
  Enabled: true
695

696
# Use the configured style when naming variables.
697
Style/VariableName:
698 699
  EnforcedStyle: snake_case
  Enabled: true
700

701
# Use when x then ... for one-line cases.
702
Style/WhenThen:
703
  Enabled: true
704

705
# Checks for redundant do after while or until.
706
Style/WhileUntilDo:
707
  Enabled: true
708

709
# Favor modifier while/until usage when you have a single-line body.
710
Style/WhileUntilModifier:
711
  Enabled: true
712

713
# Use %w or %W for arrays of words.
714 715 716
Style/WordArray:
  Enabled: false

717 718 719 720 721 722
# TODO: Enable ZeroLengthPredicate Cop.
# Use #empty? when testing for objects of length 0.
Style/ZeroLengthPredicate:
  Enabled: false


723 724
#################### Metrics ################################

725 726
# A calculated magnitude based on number of assignments,
# branches, and conditions.
727
Metrics/AbcSize:
Grzegorz Bizon's avatar
Grzegorz Bizon committed
728
  Enabled: true
729
  Max: 60
Grzegorz Bizon's avatar
Grzegorz Bizon committed
730

731
# Avoid excessive block nesting.
732
Metrics/BlockNesting:
Grzegorz Bizon's avatar
Grzegorz Bizon committed
733 734
  Enabled: true
  Max: 4
735

736
# Avoid classes longer than 100 lines of code.
737 738 739
Metrics/ClassLength:
  Enabled: false

740 741 742 743 744 745 746
# 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.
747 748 749
Metrics/LineLength:
  Enabled: false

750
# Avoid methods longer than 10 lines of code.
751 752 753
Metrics/MethodLength:
  Enabled: false

754
# Avoid modules longer than 100 lines of code.
755 756 757
Metrics/ModuleLength:
  Enabled: false

758 759 760 761 762 763 764 765
# 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
766
  Max: 18
767 768


769 770
#################### Lint ################################

771 772
# Checks for ambiguous operators in the first argument of a method invocation
# without parentheses.
773 774 775
Lint/AmbiguousOperator:
  Enabled: false

776 777
# Checks for ambiguous regexp literals in the first argument of a method
# invocation without parentheses.
778 779 780
Lint/AmbiguousRegexpLiteral:
  Enabled: false

781
# Don't use assignment in conditions.
782 783 784
Lint/AssignmentInCondition:
  Enabled: false

785
# Align block ends correctly.
786
Lint/BlockAlignment:
787
  Enabled: true
788

789 790 791
# Default values in optional keyword arguments and optional ordinal arguments
# should not refer back to the name of the argument.
Lint/CircularArgumentReference:
792
  Enabled: true
793 794

# Checks for condition placed in a confusing position relative to the keyword.
795
Lint/ConditionPosition:
796
  Enabled: true
797

798
# Check for debugger calls.
799
Lint/Debugger:
800
  Enabled: true
801

802
# Align ends corresponding to defs correctly.
803
Lint/DefEndAlignment:
804
  Enabled: true
805

806
# Check for deprecated class method calls.
807
Lint/DeprecatedClassMethods:
808
  Enabled: true
809

810 811 812 813 814 815 816 817 818 819
# Check for duplicate method definitions.
Lint/DuplicateMethods:
  Enabled: false

# Check for duplicate keys in hash literals.
Lint/DuplicatedKey:
  Enabled: false

# Check for immutable argument given to each_with_object.
Lint/EachWithObjectArgument:
820
  Enabled: true
821 822

# Check for odd code arrangement in an else block.
823
Lint/ElseLayout:
824
  Enabled: true
825

826
# Checks for empty ensure block.
827
Lint/EmptyEnsure:
828
  Enabled: true
829

830
# Checks for empty string interpolation.
831 832 833
Lint/EmptyInterpolation:
  Enabled: false

834
# Align ends correctly.
835
Lint/EndAlignment:
836
  Enabled: true
837

838
# END blocks should not be placed inside method definitions.
839
Lint/EndInMethod:
840
  Enabled: true
841

842
# Do not use return in an ensure block.
843
Lint/EnsureReturn:
844
  Enabled: true
845

846
# The use of eval represents a serious security risk.
847
Lint/Eval:
848
  Enabled: true
849

850 851
# Catches floating-point literals too large or small for Ruby to represent.
Lint/FloatOutOfRange:
852
  Enabled: true
853 854 855

# The number of parameters to format/sprint must match the fields.
Lint/FormatParameterMismatch:
856
  Enabled: true
857 858

# Don't suppress exception.
859 860 861
Lint/HandleExceptions:
  Enabled: false

862 863 864
# Checks for adjacent string literals on the same line, which could better be
# represented as a single string literal.
Lint/ImplicitStringConcatenation:
865
  Enabled: true
866 867 868 869 870 871 872 873 874

# TODO: Enable IneffectiveAccessModifier Cop.
# Checks for attempts to use `private` or `protected` to set the visibility
# of a class method, which does not work.
Lint/IneffectiveAccessModifier:
  Enabled: false

# Checks for invalid character literals with a non-escaped whitespace
# character.
875
Lint/InvalidCharacterLiteral:
876
  Enabled: true