Skip to content

Sort RuboCop config and configure cops explicitly - #742

Merged
tagliala merged 1 commit into
masterfrom
chore/sort-rubocop
Sep 18, 2026
Merged

tagliala merged 1 commit into
masterfrom
chore/sort-rubocop

Conversation

@tagliala

@tagliala tagliala commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Two related changes to .rubocop.yml:

  1. Sort all top-level cop entries into stable alphabetical order. No settings are changed by this step.
  2. Remove department-level blocks and pin the cops they implicitly enable. Capybara:, Performance:, and RSpec: are dropped.

Motivation

This is preliminary work toward including all cops explicitly in the configuration to synchronize with modern RuboCop versions.

Verified with a full --show-cops comparison (all 799 cops identical to master before this change): the Capybara: and Performance: blocks were no-ops because every registered cop in those departments is already listed individually. The RSpec: Enabled: true block, however, was implicitly enabling RSpec/EmptyOutput, RSpec/ExpectInLet, RSpec/MissingExpectationTargetMethod, and RSpec/UndescriptiveLiteralsDescription — so removing it would have disabled them. Those four are now listed explicitly to preserve behavior, and Capybara/AmbiguousClick is left unlisted (it stays disabled via its plugin default, which is what the block produced anyway). Metrics: Enabled: false is retained as a single department-level disable.

@codecov

codecov Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.33%. Comparing base (e5421e2) to head (8363160).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #742   +/-   ##
=======================================
  Coverage   94.33%   94.33%           
=======================================
  Files          17       17           
  Lines         459      459           
=======================================
  Hits          433      433           
  Misses         26       26           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tagliala tagliala changed the title Sort RuboCop config entries alphabetically Sort RuboCop config and configure cops explicitly Sep 18, 2026
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.
@tagliala
tagliala merged commit eb816ce into master Sep 18, 2026
23 checks passed
@tagliala
tagliala deleted the chore/sort-rubocop branch September 18, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant