.rubocop.yml 19.2 KB
Newer Older
1 2 3
require:
  - rubocop-rspec
  - ./rubocop/rubocop
R
Robert Speicher 已提交
4

Z
Z.J. van de Weg 已提交
5 6
inherit_from: .rubocop_todo.yml

7
AllCops:
Z
Z.J. van de Weg 已提交
8 9
  TargetRubyVersion: 2.3
  # 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/**/*'
S
Sean McGivern 已提交
20 21
    - 'db/*'
    - 'db/fixtures/**/*'
22 23 24 25 26 27 28 29 30
    - 'tmp/**/*'
    - 'bin/**/*'
    - 'lib/backup/**/*'
    - 'lib/ci/backup/**/*'
    - 'lib/tasks/**/*'
    - 'lib/ci/migrate/**/*'
    - 'lib/email_validator.rb'
    - 'lib/gitlab/upgrader.rb'
    - 'lib/gitlab/seeder.rb'
31
    - 'generator_templates/**/*'
32 33 34 35 36


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

# Check indentation of private/protected visibility modifiers.
37
Style/AccessModifierIndentation:
38
  Enabled: true
39

C
Connor Shea 已提交
40 41 42 43
# Check the naming of accessor methods for get_/set_.
Style/AccessorMethodName:
  Enabled: false

44
# Use alias_method instead of alias.
45
Style/Alias:
46
  EnforcedStyle: prefer_alias_method
47
  Enabled: true
48

49
# Align the elements of an array literal if they span more than one line.
50
Style/AlignArray:
51
  Enabled: true
52

53
# Align the elements of a hash literal if they span more than one line.
54
Style/AlignHash:
55
  Enabled: true
56

57
# Use `Array#join` instead of `Array#*`.
58
Style/ArrayJoin:
59
  Enabled: true
60

61
# Use only ascii symbols in comments.
62
Style/AsciiComments:
63
  Enabled: true
64

65
# Use only ascii symbols in identifiers.
66
Style/AsciiIdentifiers:
67
  Enabled: true
68

69
# Checks for uses of Module#attr.
70
Style/Attr:
71
  Enabled: true
72

73
# Avoid the use of BEGIN blocks.
74
Style/BeginBlock:
D
Dmitriy Zaporozhets 已提交
75
  Enabled: true
76

77
# Do not use block comments.
78
Style/BlockComments:
79
  Enabled: true
80

81
# Put end statement of multiline block on its own line.
82
Style/BlockEndNewline:
83
  Enabled: true
84

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

90
# Indentation of when in a case/when/[else/]end.
91
Style/CaseIndentation:
92
  Enabled: true
93

94
# Checks for uses of character literals.
95
Style/CharacterLiteral:
D
Dmitriy Zaporozhets 已提交
96
  Enabled: true
97

98
# Use CamelCase for classes and modules.'
99
Style/ClassAndModuleCamelCase:
D
Dmitriy Zaporozhets 已提交
100
  Enabled: true
101

102
# Checks style of children classes and modules.
103 104 105
Style/ClassAndModuleChildren:
  Enabled: false

106
# Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.
107 108 109
Style/ClassCheck:
  Enabled: false

110
# Use self when defining module/class methods.
111
Style/ClassMethods:
112
  Enabled: true
113

114
# Avoid the use of class variables.
115
Style/ClassVars:
D
Dmitriy Zaporozhets 已提交
116
  Enabled: true
117

118
# Indentation of comments.
119
Style/CommentIndentation:
120
  Enabled: true
121

122
# Constants should use SCREAMING_SNAKE_CASE.
123
Style/ConstantName:
124
  Enabled: true
125

126
# Use def with parentheses when there are arguments.
127
Style/DefWithParentheses:
128
  Enabled: true
129

130
# Document classes and non-namespace modules.
131 132 133
Style/Documentation:
  Enabled: false

134
# Align elses and elsifs correctly.
135
Style/ElseAlignment:
136
  Enabled: true
137

138
# Use empty lines between defs.
139 140 141
Style/EmptyLineBetweenDefs:
  Enabled: false

142
# Don't use several empty lines in a row.
143
Style/EmptyLines:
144
  Enabled: true
145

146
# Keep blank lines around access modifiers.
147
Style/EmptyLinesAroundAccessModifier:
148
  Enabled: true
149

150
# Keeps track of empty lines around block bodies.
151
Style/EmptyLinesAroundBlockBody:
152
  Enabled: true
153

154
# Keeps track of empty lines around class bodies.
155
Style/EmptyLinesAroundClassBody:
156
  Enabled: true
157

158
# Keeps track of empty lines around module bodies.
159
Style/EmptyLinesAroundModuleBody:
160
  Enabled: true
161

162
# Keeps track of empty lines around method bodies.
163
Style/EmptyLinesAroundMethodBody:
164
  Enabled: true
165

166
# Avoid the use of END blocks.
167
Style/EndBlock:
168
  Enabled: true
169

170
# Use Unix-style line endings.
171
Style/EndOfLine:
172
  Enabled: true
173

174
# Favor the use of Fixnum#even? && Fixnum#odd?
175
Style/EvenOdd:
176
  Enabled: true
177

178
# Use snake_case for source file names.
179
Style/FileName:
180 181 182
  Enabled: true

# Checks for a line break before the first parameter in a multi-line method
183
# parameter definition.
184 185
Style/FirstMethodParameterLineBreak:
  Enabled: true
186

187
# Checks for flip flops.
188
Style/FlipFlop:
189
  Enabled: true
190

191
# Checks use of for or each in multiline loops.
192
Style/For:
G
Grzegorz Bizon 已提交
193
  Enabled: true
194

Z
Z.J. van de Weg 已提交
195 196 197
# Checks if there is a magic comment to enforce string literals
Style/FrozenStringLiteralComment:
  Enabled: false
198
# Do not introduce global variables.
199
Style/GlobalVars:
200
  Enabled: true
201

202 203
# Prefer Ruby 1.9 hash syntax `{ a: 1, b: 2 }`
# over 1.8 syntax `{ :a => 1, :b => 2 }`.
204
Style/HashSyntax:
205
  Enabled: true
206

207
# Do not use if x; .... Use the ternary operator instead.
208
Style/IfWithSemicolon:
209
  Enabled: true
210

211 212 213
# 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:
214
  Enabled: true
215 216

# Checks the indentation of the first line of the right-hand-side of a
G
Gabriel Mazetto 已提交
217
# multi-line assignment.
218
Style/IndentAssignment:
219
  Enabled: true
220 221

# Keep indentation straight.
222
Style/IndentationConsistency:
223
  Enabled: true
224

225
# Use 2 spaces for indentation.
226
Style/IndentationWidth:
227
  Enabled: true
228

229
# Use Kernel#loop for infinite loops.
230
Style/InfiniteLoop:
231
  Enabled: true
232

233
# Use lambda.call(...) instead of lambda.(...).
234
Style/LambdaCall:
235
  Enabled: true
236

237
# Comments should start with a space.
238
Style/LeadingCommentSpace:
F
Felipe Artur 已提交
239
  Enabled: true
240

241
# Checks if the method definitions have or don't have parentheses.
242
Style/MethodDefParentheses:
243
  Enabled: true
244

245
# Use the configured style when naming methods.
246
Style/MethodName:
247
  Enabled: true
248

C
Connor Shea 已提交
249 250 251 252
# Checks for usage of `extend self` in modules.
Style/ModuleFunction:
  Enabled: false

R
Robert Speicher 已提交
253 254 255 256 257 258
# 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

259
# Avoid multi-line chains of blocks.
260
Style/MultilineBlockChain:
261
  Enabled: true
262

263
# Ensures newlines after multiline block do statements.
264
Style/MultilineBlockLayout:
265
  Enabled: true
266

R
Robert Speicher 已提交
267 268 269 270 271 272
# 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

273
# Do not use then for multi-line if/unless.
274
Style/MultilineIfThen:
275
  Enabled: true
276

R
Robert Speicher 已提交
277 278 279 280 281 282
# 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

283 284 285 286 287
# Checks indentation of method calls with the dot operator that span more than
# one line.
Style/MultilineMethodCallIndentation:
  Enabled: false

288 289 290 291 292
# 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

293
# Checks indentation of binary operations that span more than one line.
294 295 296
Style/MultilineOperationIndentation:
  Enabled: false

297 298 299 300
# Avoid multi-line `? :` (the ternary operator), use if/unless instead.
Style/MultilineTernaryOperator:
  Enabled: true

301
# Favor unless over if for negative conditions (or control flow or).
302
Style/NegatedIf:
303
  Enabled: true
304

305 306
# Avoid using nested modifiers.
Style/NestedModifier:
307
  Enabled: true
308 309

# Use one expression per branch in a ternary operator.
310
Style/NestedTernaryOperator:
311
  Enabled: true
312

313
# Prefer x.nil? to x == nil.
314
Style/NilComparison:
315
  Enabled: true
316

317
# Checks for redundant nil checks.
318
Style/NonNilCheck:
319
  Enabled: true
320

321
# Use ! instead of not.
322
Style/Not:
323
  Enabled: true
324

325
# Add underscores to large numeric literals to improve their readability.
326 327 328
Style/NumericLiterals:
  Enabled: false

329
# Favor the ternary operator(?:) over if/then/else/end constructs.
330
Style/OneLineConditional:
331
  Enabled: true
332

333
# When defining binary operators, name the argument other.
334
Style/OpMethod:
335
  Enabled: true
336

337
# Don't use parentheses around the condition of an if/unless/while.
338
Style/ParenthesesAroundCondition:
339
  Enabled: true
340

341 342
# Checks for parentheses that seem not to serve any purpose.
Style/RedundantParentheses:
343
  Enabled: true
344 345

# Don't use return where it's not required.
346
Style/RedundantReturn:
347
  Enabled: true
348

349
# Don't use semicolons to terminate expressions.
350
Style/Semicolon:
351
  Enabled: true
352

353
# Checks for proper usage of fail and raise.
354
Style/SignalException:
355 356
  EnforcedStyle: only_raise
  Enabled: true
357

358
# Use spaces after colons.
359
Style/SpaceAfterColon:
360
  Enabled: true
361

362
# Use spaces after commas.
363
Style/SpaceAfterComma:
364
  Enabled: true
365

366 367
# Do not put a space between a method name and the opening parenthesis in a
# method definition.
368
Style/SpaceAfterMethodName:
369
  Enabled: true
370

371
# Tracks redundant space after the ! operator.
372
Style/SpaceAfterNot:
373
  Enabled: true
374

375
# Use spaces after semicolons.
376
Style/SpaceAfterSemicolon:
377
  Enabled: true
378

379 380 381 382
# Use space around equals in parameter default
Style/SpaceAroundEqualsInParameterDefault:
  Enabled: true

383 384
# Use a space around keywords if appropriate.
Style/SpaceAroundKeyword:
385
  Enabled: true
386

387 388
# Use a single space around operators.
Style/SpaceAroundOperators:
G
Gabriel Mazetto 已提交
389
  Enabled: true
390

391 392
# No spaces before commas.
Style/SpaceBeforeComma:
393
  Enabled: true
394

395 396
# Checks for missing space between code and a comment on the same line.
Style/SpaceBeforeComment:
397
  Enabled: true
398

399 400
# No spaces before semicolons.
Style/SpaceBeforeSemicolon:
401
  Enabled: true
402

403
# Use spaces inside hash literal braces - or don't.
404
Style/SpaceInsideHashLiteralBraces:
405
  Enabled: true
406

407
# No spaces inside range literals.
408
Style/SpaceInsideRangeLiteral:
409
  Enabled: true
410

411 412
# Checks for padding/surrounding spaces inside string interpolation.
Style/SpaceInsideStringInterpolation:
413 414
  EnforcedStyle: no_space
  Enabled: true
415 416 417

# Check for the usage of parentheses around stabby lambda arguments.
Style/StabbyLambdaParentheses:
418 419
  EnforcedStyle: require_parentheses
  Enabled: true
420 421

# Checks if uses of quotes match the configured preference.
422 423 424
Style/StringLiterals:
  Enabled: false

425 426
# Checks if configured preferred methods are used over non-preferred.
Style/StringMethods:
427 428 429
  PreferredMethods:
    intern: to_sym
  Enabled: true
430 431

# No hard tabs.
432
Style/Tab:
D
Dmitriy Zaporozhets 已提交
433
  Enabled: true
434

435
# Checks trailing blank lines and final newline.
436
Style/TrailingBlankLines:
437
  Enabled: true
438

439
# Checks for %W when interpolation is not needed.
440
Style/UnneededCapitalW:
441
  Enabled: true
442

443
# Checks for %q/%Q when single quotes or double quotes would do.
444 445 446
Style/UnneededPercentQ:
  Enabled: false

447
# Don't interpolate global, instance and class variables directly in strings.
448
Style/VariableInterpolation:
449
  Enabled: true
450

451
# Use the configured style when naming variables.
452
Style/VariableName:
453 454
  EnforcedStyle: snake_case
  Enabled: true
455

456
# Use when x then ... for one-line cases.
457
Style/WhenThen:
458
  Enabled: true
459

460
# Checks for redundant do after while or until.
461
Style/WhileUntilDo:
462
  Enabled: true
463

464
# Favor modifier while/until usage when you have a single-line body.
465
Style/WhileUntilModifier:
466
  Enabled: true
467

468
# Use %w or %W for arrays of words.
469 470 471 472 473
Style/WordArray:
  Enabled: false

#################### Metrics ################################

474 475
# A calculated magnitude based on number of assignments,
# branches, and conditions.
476
Metrics/AbcSize:
G
Grzegorz Bizon 已提交
477
  Enabled: true
478
  Max: 60
G
Grzegorz Bizon 已提交
479

480
# Avoid excessive block nesting.
481
Metrics/BlockNesting:
G
Grzegorz Bizon 已提交
482 483
  Enabled: true
  Max: 4
484

485
# Avoid classes longer than 100 lines of code.
486 487 488
Metrics/ClassLength:
  Enabled: false

489 490 491 492 493 494 495
# 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.
496 497 498
Metrics/LineLength:
  Enabled: false

499
# Avoid methods longer than 10 lines of code.
500 501 502
Metrics/MethodLength:
  Enabled: false

503
# Avoid modules longer than 100 lines of code.
504 505 506
Metrics/ModuleLength:
  Enabled: false

507 508 509 510 511 512 513 514
# 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
V
Valery Sizov 已提交
515
  Max: 18
516 517


518 519
#################### Lint ################################

520 521 522 523 524 525 526 527 528
# Checks for useless access modifiers.
Lint/UselessAccessModifier:
  Enabled: true

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

529 530
# Checks for ambiguous operators in the first argument of a method invocation
# without parentheses.
531
Lint/AmbiguousOperator:
532
  Enabled: true
533

534
# Align block ends correctly.
535
Lint/BlockAlignment:
536
  Enabled: true
537

538 539 540
# Default values in optional keyword arguments and optional ordinal arguments
# should not refer back to the name of the argument.
Lint/CircularArgumentReference:
541
  Enabled: true
542 543

# Checks for condition placed in a confusing position relative to the keyword.
544
Lint/ConditionPosition:
545
  Enabled: true
546

547
# Check for debugger calls.
548
Lint/Debugger:
549
  Enabled: true
550

551
# Align ends corresponding to defs correctly.
552
Lint/DefEndAlignment:
553
  Enabled: true
554

555
# Check for deprecated class method calls.
556
Lint/DeprecatedClassMethods:
557
  Enabled: true
558

559 560
# Check for immutable argument given to each_with_object.
Lint/EachWithObjectArgument:
561
  Enabled: true
562 563

# Check for odd code arrangement in an else block.
564
Lint/ElseLayout:
565
  Enabled: true
566

567
# Checks for empty ensure block.
568
Lint/EmptyEnsure:
569
  Enabled: true
570

571
# Align ends correctly.
572
Lint/EndAlignment:
573
  Enabled: true
574

575
# END blocks should not be placed inside method definitions.
576
Lint/EndInMethod:
577
  Enabled: true
578

579
# Do not use return in an ensure block.
580
Lint/EnsureReturn:
581
  Enabled: true
582

583
# The use of eval represents a serious security risk.
584
Lint/Eval:
585
  Enabled: true
586

587 588
# Catches floating-point literals too large or small for Ruby to represent.
Lint/FloatOutOfRange:
589
  Enabled: true
590 591 592

# The number of parameters to format/sprint must match the fields.
Lint/FormatParameterMismatch:
593
  Enabled: true
594 595 596 597

# Checks for adjacent string literals on the same line, which could better be
# represented as a single string literal.
Lint/ImplicitStringConcatenation:
598
  Enabled: true
599 600 601

# Checks for invalid character literals with a non-escaped whitespace
# character.
602
Lint/InvalidCharacterLiteral:
603
  Enabled: true
604

605
# Checks of literals used in conditions.
606
Lint/LiteralInCondition:
607
  Enabled: true
608

609
# Checks for literals used in interpolation.
610
Lint/LiteralInInterpolation:
611
  Enabled: true
612

613 614
# Do not use nested method definitions.
Lint/NestedMethodDefinition:
615
  Enabled: true
616 617 618

# Do not omit the accumulator when calling `next` in a `reduce`/`inject` block.
Lint/NextWithoutAccumulator:
619
  Enabled: true
620 621

# Checks for method calls with a space before the opening parenthesis.
622
Lint/ParenthesesAsGroupedExpression:
623
  Enabled: true
624

625 626 627
# Checks for `rand(1)` calls. Such calls always return `0` and most likely
# a mistake.
Lint/RandOne:
628
  Enabled: true
629 630

# Use parentheses in the method call to avoid confusion about precedence.
631
Lint/RequireParentheses:
632
  Enabled: true
633

634
# Avoid rescuing the Exception class.
635
Lint/RescueException:
636
  Enabled: true
637

C
Connor Shea 已提交
638 639
# Checks for the order which exceptions are rescued to avoid rescueing a less specific exception before a more specific exception.
Lint/ShadowedException:
640 641
  Enabled: false

642
# Do not use prefix `_` for a variable that is used.
643
Lint/UnderscorePrefixedVariableName:
644
  Enabled: true
645

646 647 648 649 650 651 652
# 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

# Unreachable code.
653
Lint/UnreachableCode:
654
  Enabled: true
655

656
# Checks for useless assignment to a local variable.
657
Lint/UselessAssignment:
658
  Enabled: true
659

660
# Checks for comparison of something with itself.
661
Lint/UselessComparison:
662
  Enabled: true
663

664
# Checks for useless `else` in `begin..end` without `rescue`.
665
Lint/UselessElseWithoutRescue:
666
  Enabled: true
667

668
# Checks for useless setter call to a local variable.
669
Lint/UselessSetterCall:
670
  Enabled: true
671

672
# Possible use of operator/literal/variable in void context.
673
Lint/Void:
674
  Enabled: true
675

676 677 678 679 680

##################### Performance ############################

# Use `casecmp` rather than `downcase ==`.
Performance/Casecmp:
681
  Enabled: true
682 683 684 685

# Use `str.{start,end}_with?(x, ..., y, ...)` instead of
# `str.{start,end}_with?(x, ...) || str.{start,end}_with?(y, ...)`.
Performance/DoubleStartEndWith:
686
  Enabled: true
687 688 689

# Use `strip` instead of `lstrip.rstrip`.
Performance/LstripRstrip:
C
Connor Shea 已提交
690
  Enabled: true
691 692 693

# Use `Range#cover?` instead of `Range#include?`.
Performance/RangeInclude:
694
  Enabled: true
695 696 697

# Use `sort` instead of `sort_by { |x| x }`.
Performance/RedundantSortBy:
698
  Enabled: true
699 700 701 702

# Use `start_with?` instead of a regex match anchored to the beginning of a
# string.
Performance/StartWith:
703
  Enabled: true
C
Connor Shea 已提交
704

705 706 707 708
# Use `tr` instead of `gsub` when you are replacing the same number of
# characters. Use `delete` instead of `gsub` when you are deleting
# characters.
Performance/StringReplacement:
C
Connor Shea 已提交
709
  Enabled: true
710 711 712

# Checks for `.times.map` calls.
Performance/TimesMap:
713
  Enabled: true
714 715


716 717
##################### Rails ##################################

718 719 720 721 722
# Enables Rails cops.
Rails:
  Enabled: true

# Enforces consistent use of action filter methods.
723
Rails/ActionFilter:
724
  Enabled: true
725
  EnforcedStyle: action
726

727 728
# Checks the correct usage of date aware methods, such as `Date.today`,
# `Date.current`, etc.
G
Gabriel Mazetto 已提交
729 730 731
Rails/Date:
  Enabled: false

732 733
# Prefer delegate method for delegations.
Rails/Delegate:
734 735
  Enabled: false

736 737
# Prefer `find_by` over `where.first`.
Rails/FindBy:
738
  Enabled: true
739 740 741

# Prefer `all.find_each` over `all.find`.
Rails/FindEach:
742
  Enabled: true
743

744
# Prefer has_many :through to has_and_belongs_to_many.
745
Rails/HasAndBelongsToMany:
746
  Enabled: true
747

748
# Checks for calls to puts, print, etc.
749
Rails/Output:
750
  Enabled: true
751

752 753
# Checks for incorrect grammar when using methods like `3.day.ago`.
Rails/PluralizationGrammar:
754
  Enabled: true
755 756

# Checks for `read_attribute(:attr)` and `write_attribute(:attr, val)`.
757 758 759
Rails/ReadWriteAttribute:
  Enabled: false

760
# Checks the arguments of ActiveRecord scopes.
761
Rails/ScopeArgs:
762
  Enabled: true
763

R
Robert Speicher 已提交
764 765
##################### RSpec ##################################

766
# Check that instances are not being stubbed globally.
R
Robert Speicher 已提交
767 768 769
RSpec/AnyInstance:
  Enabled: false

770 771
# Check that the first argument to the top level describe is the tested class or
# module.
R
Robert Speicher 已提交
772 773 774
RSpec/DescribeClass:
  Enabled: false

775
# Use `described_class` for tested class / module.
R
Robert Speicher 已提交
776 777 778
RSpec/DescribeMethod:
  Enabled: false

779 780 781
# Checks that the second argument to top level describe is the tested method
# name.
RSpec/DescribedClass:
R
Robert Speicher 已提交
782 783
  Enabled: false

784
# Checks for long example.
R
Robert Speicher 已提交
785 786 787 788
RSpec/ExampleLength:
  Enabled: false
  Max: 5

789
# Do not use should when describing your tests.
R
Robert Speicher 已提交
790 791 792 793 794 795 796 797
RSpec/ExampleWording:
  Enabled: false
  CustomTransform:
    be: is
    have: has
    not: does not
  IgnoredWords: []

798
# Checks the file and folder naming of the spec file.
R
Robert Speicher 已提交
799 800 801 802 803 804
RSpec/FilePath:
  Enabled: false
  CustomTransform:
    RuboCop: rubocop
    RSpec: rspec

805
# Checks if there are focused specs.
R
Robert Speicher 已提交
806 807 808
RSpec/Focus:
  Enabled: true

809
# Checks for the usage of instance variables.
R
Robert Speicher 已提交
810 811 812
RSpec/InstanceVariable:
  Enabled: false

813
# Checks for multiple top-level describes.
R
Robert Speicher 已提交
814 815 816
RSpec/MultipleDescribes:
  Enabled: false

817
# Enforces the usage of the same method on all negative message expectations.
R
Robert Speicher 已提交
818 819
RSpec/NotToNot:
  EnforcedStyle: not_to
820
  Enabled: true
R
Robert Speicher 已提交
821

822
# Prefer using verifying doubles over normal doubles.
R
Robert Speicher 已提交
823 824
RSpec/VerifiedDoubles:
  Enabled: false