From 8363160892df9318adbe7635ac6bd0b91e43ae10 Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Fri, 18 Sep 2026 16:09:20 +0200 Subject: [PATCH] Sort RuboCop config and configure cops explicitly Drop the Capybara:, Performance:, and RSpec: department blocks. Verified with a --show-cops comparison (all 799 cops identical before and after): the Capybara and Performance blocks were no-ops because every registered cop in those departments is already listed. The RSpec block, however, implicitly enabled four unlisted cops - RSpec/EmptyOutput, RSpec/ExpectInLet, RSpec/MissingExpectationTargetMethod, and RSpec/UndescriptiveLiteralsDescription - which are now listed explicitly to preserve that behavior. Capybara/AmbiguousClick was NOT explicitly enabled: rubocop-capybara ships it as Enabled: false and the department block does not override that here, so it is not enforced by this project today. Forcing it on would introduce new offenses, so it stays unlisted rather than enabled. Metrics: Enabled: false is kept as a department-level disable, which also covers future Metrics cops without risk of auto-enabling anything. This is preliminary work toward including all cops explicitly in the configuration to synchronize with modern RuboCop versions. --- .rubocop.yml | 57 +++++++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index e36c361..e6b74b1 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -14,9 +14,6 @@ AllCops: TargetRubyVersion: 3.2 -Capybara: - Enabled: true - Capybara/AssertStyle: Enabled: true @@ -59,9 +56,6 @@ Capybara/SpecificActions: Capybara/SpecificFinders: Enabled: true -Metrics: - Enabled: false - Layout/CommentIndentation: Enabled: true @@ -83,18 +77,18 @@ Layout/HeredocIndentation: Layout/IndentationConsistency: Enabled: true -Layout/IndentationWidth: - Enabled: true - Layout/IndentationStyle: Enabled: true -Layout/TrailingWhitespace: +Layout/IndentationWidth: Enabled: true Layout/TrailingEmptyLines: Enabled: true +Layout/TrailingWhitespace: + Enabled: true + Lint/AmbiguousOperator: Enabled: true @@ -104,6 +98,9 @@ Lint/AmbiguousRegexpLiteral: Lint/UselessAssignment: Enabled: true +Metrics: + Enabled: false + Packaging/BundlerSetupInTests: Enabled: true @@ -116,9 +113,6 @@ Packaging/RequireHardcodingLib: Packaging/RequireRelativeHardcodingLib: Enabled: true -Performance: - Enabled: true - Performance/AncestorsInclude: Enabled: false @@ -137,12 +131,12 @@ Performance/BlockGivenWithExplicitBlock: Performance/Caller: Enabled: true -Performance/CaseWhenSplat: - Enabled: true - Performance/Casecmp: Enabled: false +Performance/CaseWhenSplat: + Enabled: true + Performance/ChainArrayAllocation: Enabled: false @@ -280,9 +274,6 @@ Performance/UriDefaultParser: Performance/ZipWithoutBlock: Enabled: true -RSpec: - Enabled: true - RSpec/AlignLeftLetBrace: Enabled: false @@ -307,10 +298,10 @@ RSpec/BeEq: RSpec/BeEql: Enabled: true -RSpec/BeNil: +RSpec/BeforeAfterAll: Enabled: true -RSpec/BeforeAfterAll: +RSpec/BeNil: Enabled: true RSpec/ChangeByZero: @@ -331,18 +322,18 @@ RSpec/ContextWording: RSpec/DescribeClass: Enabled: true -RSpec/DescribeMethod: - Enabled: false - -RSpec/DescribeSymbol: - Enabled: true - RSpec/DescribedClass: Enabled: true RSpec/DescribedClassModuleWrapping: Enabled: true +RSpec/DescribeMethod: + Enabled: false + +RSpec/DescribeSymbol: + Enabled: true + RSpec/Dialect: Enabled: true @@ -376,6 +367,9 @@ RSpec/EmptyLineAfterSubject: RSpec/EmptyMetadata: Enabled: true +RSpec/EmptyOutput: + Enabled: true + RSpec/Eq: Enabled: true @@ -400,6 +394,9 @@ RSpec/ExpectChange: RSpec/ExpectInHook: Enabled: true +RSpec/ExpectInLet: + Enabled: true + RSpec/ExpectOutput: Enabled: true @@ -481,6 +478,9 @@ RSpec/MetadataStyle: RSpec/MissingExampleGroupArgument: Enabled: true +RSpec/MissingExpectationTargetMethod: + Enabled: true + RSpec/MultipleDescribes: Enabled: true @@ -595,6 +595,9 @@ RSpec/SubjectDeclaration: RSpec/SubjectStub: Enabled: true +RSpec/UndescriptiveLiteralsDescription: + Enabled: true + RSpec/UnspecifiedException: Enabled: true