diff --git a/spec/.rubocop.yml b/spec/.rubocop.yml index ca9b0429f9..7a7c29aac7 100644 --- a/spec/.rubocop.yml +++ b/spec/.rubocop.yml @@ -7,6 +7,27 @@ AllCops: Bundler/DuplicatedGem: Enabled: true +FactoryBot/AssociationStyle: # new in 2.23 + Enabled: true + +FactoryBot/ConsistentParenthesesStyle: + Enabled: true + +FactoryBot/FactoryNameStyle: + Enabled: true + +FactoryBot/FactoryAssociationWithStrategy: # new in 2.23 + Enabled: true + +FactoryBot/IdSequence: # new in <> + Enabled: true + +FactoryBot/RedundantFactoryOption: # new in 2.23 + Enabled: true + +FactoryBot/SyntaxMethods: + Enabled: true + Layout/ParameterAlignment: Enabled: true @@ -49,6 +70,21 @@ Lint/AmbiguousBlockAssociation: Lint/AmbiguousRegexpLiteral: Enabled: true +Lint/DuplicateMatchPattern: # new in 1.50 + Enabled: true + +Lint/ItWithoutArgumentsInBlock: # new in 1.59 + Enabled: true + +Lint/LiteralAssignmentInCondition: # new in 1.58 + Enabled: true + +Lint/MixedCaseRange: # new in 1.53 + Enabled: true + +Lint/RedundantRegexpQuantifiers: # new in 1.53 + Enabled: true + Lint/SuppressedException: Enabled: true @@ -337,6 +373,12 @@ Style/ComparableClamp: Style/ConcatArrayLiterals: Enabled: true +Style/DataInheritance: # new in 1.49 + Enabled: true + +Style/DirEmpty: # new in 1.48 + Enabled: true + Style/DocumentDynamicEvalDefinition: Enabled: true @@ -349,6 +391,12 @@ Style/EndlessMethod: Style/EnvHome: Enabled: true +Style/ExactRegexpMatch: # new in 1.51 + Enabled: true + +Style/FileEmpty: # new in 1.48 + Enabled: true + Style/FetchEnvVar: Enabled: true @@ -418,42 +466,81 @@ Style/QuotedSymbols: Style/RedundantArgument: Enabled: true +Style/RedundantArrayConstructor: # new in 1.52 + Enabled: true + Style/RedundantConstantBase: Enabled: true +Style/RedundantCurrentDirectoryInPath: # new in 1.53 + Enabled: true + Style/RedundantDoubleSplatHashBraces: Enabled: true Style/RedundantEach: Enabled: true +Style/RedundantFilterChain: # new in 1.52 + Enabled: true + Style/RedundantHeredocDelimiterQuotes: Enabled: true Style/RedundantInitialize: Enabled: true +Style/RedundantLineContinuation: # new in 1.49 + Enabled: true + +Style/RedundantRegexpArgument: # new in 1.53 + Enabled: true + +Style/RedundantRegexpConstructor: # new in 1.52 + Enabled: true + Style/RedundantSelfAssignmentBranch: Enabled: true Style/RedundantStringEscape: Enabled: true +Style/ReturnNilInPredicateMethodDefinition: # new in 1.53 + Enabled: true + Style/SelectByRegexp: Enabled: true +Style/SingleLineDoEndBlock: # new in 1.57 + Enabled: true + Style/StringChars: Enabled: true +Style/SuperWithArgsParentheses: # new in 1.58 + Enabled: true + Style/SwapValues: Enabled: true +Style/YAMLFileRead: # new in 1.53 + Enabled: true + +Capybara/ClickLinkOrButtonStyle: # new in 2.19 + Enabled: true + Capybara/MatchStyle: Enabled: true Capybara/NegationMatcher: Enabled: true +Capybara/RSpec/HaveSelector: # new in 2.19 + Enabled: true + +Capybara/RSpec/PredicateMatcher: # new in 2.19 + Enabled: true + Capybara/SpecificActions: Enabled: true @@ -463,6 +550,9 @@ Capybara/SpecificFinders: Capybara/SpecificMatcher: Enabled: true +RSpec/BeEmpty: # new in 2.20 + Enabled: true + RSpec/BeEq: Enabled: true @@ -472,37 +562,61 @@ RSpec/BeNil: RSpec/ChangeByZero: Enabled: true +RSpec/ContainExactly: # new in 2.19 + Enabled: true + RSpec/DuplicatedMetadata: Enabled: true +RSpec/EmptyMetadata: # new in 2.24 + Enabled: true + +RSpec/Eq: # new in 2.24 + Enabled: true + RSpec/ExcessiveDocstringSpacing: Enabled: true RSpec/IdenticalEqualityAssertion: Enabled: true +RSpec/IndexedLet: # new in 2.20 + Enabled: true + +RSpec/MatchArray: # new in 2.19 + Enabled: true + +RSpec/MetadataStyle: # new in 2.24 + Enabled: true + RSpec/NoExpectationExample: Enabled: true RSpec/PendingWithoutReason: Enabled: true -RSpec/SortMetadata: +RSpec/ReceiveMessages: # new in 2.23 Enabled: true -RSpec/SubjectDeclaration: +RSpec/RedundantAround: # new in 2.19 Enabled: true -RSpec/VerifiedDoubleReference: +RSpec/SkipBlockInsideExample: # new in 2.19 Enabled: true -RSpec/FactoryBot/ConsistentParenthesesStyle: +RSpec/SortMetadata: Enabled: true -RSpec/FactoryBot/FactoryNameStyle: +RSpec/SpecFilePathFormat: # new in 2.24 Enabled: true -RSpec/FactoryBot/SyntaxMethods: +RSpec/SpecFilePathSuffix: # new in 2.24 + Enabled: true + +RSpec/SubjectDeclaration: + Enabled: true + +RSpec/VerifiedDoubleReference: Enabled: true RSpec/Rails/AvoidSetupHook: @@ -517,6 +631,12 @@ RSpec/Rails/InferredSpecType: RSpec/Rails/MinitestAssertions: Enabled: true +RSpec/Rails/NegationBeValid: # new in 2.23 + Enabled: true + +RSpec/Rails/TravelAround: # new in 2.19 + Enabled: true + RSpec/MultipleMemoizedHelpers: Enabled: false