From 2ac7a43dd3960c9cd22fb1e1d1a4aad628058ce7 Mon Sep 17 00:00:00 2001 From: Denis Defreyne Date: Sat, 14 Oct 2023 21:36:16 +0200 Subject: [PATCH] Enable new cops --- .rubocop.yml | 140 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 138 insertions(+), 2 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index f576f72..5cdf7b6 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -111,7 +111,7 @@ RSpec/IdenticalEqualityAssertion: # new in 2.4 Enabled: true RSpec/SubjectDeclaration: # new in 2.5 Enabled: true -RSpec/FactoryBot/SyntaxMethods: # new in 2.7 +FactoryBot/SyntaxMethods: # new in 2.7 Enabled: true RSpec/Rails/AvoidSetupHook: # new in 2.4 Enabled: true @@ -147,10 +147,142 @@ RSpec/ChangeByZero: # new in 2.11.0 Enabled: true RSpec/VerifiedDoubleReference: # new in 2.10.0 Enabled: true -RSpec/Capybara/SpecificMatcher: # new in 2.12 +Capybara/SpecificMatcher: # new in 2.12 Enabled: true RSpec/Rails/HaveHttpStatus: # new in 2.12 Enabled: true +Gemspec/DevelopmentDependencies: # new in 1.44 + Enabled: true +Lint/DuplicateMagicComment: # new in 1.37 + Enabled: true +Lint/DuplicateMatchPattern: # new in 1.50 + Enabled: true +Lint/MixedCaseRange: # new in 1.53 + Enabled: true +Lint/RedundantRegexpQuantifiers: # new in 1.53 + Enabled: true +Lint/RequireRangeParentheses: # new in 1.32 + Enabled: true +Lint/UselessRescue: # new in 1.43 + Enabled: true +Metrics/CollectionLiteralLength: # new in 1.47 + Enabled: true +Style/ArrayIntersect: # new in 1.40 + Enabled: true +Style/ComparableClamp: # new in 1.44 + Enabled: true +Style/ConcatArrayLiterals: # new in 1.41 + Enabled: true +Style/DataInheritance: # new in 1.49 + Enabled: true +Style/DirEmpty: # new in 1.48 + Enabled: true +Style/EmptyHeredoc: # new in 1.32 + Enabled: true +Style/ExactRegexpMatch: # new in 1.51 + Enabled: true +Style/FileEmpty: # new in 1.48 + Enabled: true +Style/MagicCommentFormat: # new in 1.35 + Enabled: true +Style/MapToSet: # new in 1.42 + Enabled: true +Style/MinMaxComparison: # new in 1.42 + Enabled: true +Style/OperatorMethodCall: # new in 1.37 + Enabled: true +Style/RedundantArrayConstructor: # new in 1.52 + Enabled: true +Style/RedundantConstantBase: # new in 1.40 + Enabled: true +Style/RedundantCurrentDirectoryInPath: # new in 1.53 + Enabled: true +Style/RedundantDoubleSplatHashBraces: # new in 1.41 + Enabled: true +Style/RedundantEach: # new in 1.38 + Enabled: true +Style/RedundantFilterChain: # new in 1.52 + Enabled: true +Style/RedundantHeredocDelimiterQuotes: # new in 1.45 + 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/RedundantStringEscape: # new in 1.37 + Enabled: true +Style/ReturnNilInPredicateMethodDefinition: # new in 1.53 + Enabled: true +Style/SingleLineDoEndBlock: # new in 1.57 + Enabled: true +Style/YAMLFileRead: # new in 1.53 + Enabled: true +Capybara/ClickLinkOrButtonStyle: # new in 2.19 + Enabled: true +Capybara/MatchStyle: # new in 2.17 + Enabled: true +Capybara/NegationMatcher: # new in 2.14 + Enabled: true +Capybara/SpecificActions: # new in 2.14 + Enabled: true +Capybara/SpecificFinders: # new in 2.13 + Enabled: true +Capybara/RSpec/HaveSelector: # new in 2.19 + Enabled: true +Capybara/RSpec/PredicateMatcher: # new in 2.19 + Enabled: true +FactoryBot/AssociationStyle: # new in 2.23 + Enabled: true +FactoryBot/ConsistentParenthesesStyle: # new in 2.14 + Enabled: true +FactoryBot/FactoryAssociationWithStrategy: # new in 2.23 + Enabled: true +FactoryBot/FactoryNameStyle: # new in 2.16 + Enabled: true +FactoryBot/IdSequence: # new in <> + Enabled: true +FactoryBot/RedundantFactoryOption: # new in 2.23 + Enabled: true +RSpec/BeEmpty: # new in 2.20 + Enabled: true +RSpec/ContainExactly: # new in 2.19 + Enabled: true +RSpec/DuplicatedMetadata: # new in 2.16 + Enabled: true +RSpec/EmptyMetadata: # new in 2.24 + Enabled: true +RSpec/Eq: # new in 2.24 + 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: # new in 2.13 + Enabled: true +RSpec/PendingWithoutReason: # new in 2.16 + Enabled: true +RSpec/ReceiveMessages: # new in 2.23 + Enabled: true +RSpec/RedundantAround: # new in 2.19 + Enabled: true +RSpec/SkipBlockInsideExample: # new in 2.19 + Enabled: true +RSpec/SortMetadata: # new in 2.14 + Enabled: true +RSpec/SpecFilePathSuffix: # new in 2.24 + Enabled: true +RSpec/Rails/InferredSpecType: # new in 2.14 + Enabled: true +RSpec/Rails/MinitestAssertions: # new in 2.17 + Enabled: true +RSpec/Rails/NegationBeValid: # new in 2.23 + Enabled: true +RSpec/Rails/TravelAround: # new in 2.19 + Enabled: true # ----- CONFIGURED ----- @@ -181,6 +313,10 @@ Style/Documentation: Style/RaiseArgs: Enabled: false +# This requires `spec/d_mark/…` which does not correspond to the `lib/` structure. +RSpec/SpecFilePathFormat: # new in 2.24 + Enabled: false + # ----- DISABLED (metrics) ----- # Cops for metrics are disabled because they should not cause tests to fail.