Skip to content

chore(rubocop): ratchet Metrics limits to current worst case - #48

Merged
mscrivo merged 1 commit into
masterfrom
chore/rubocop-ratchet-metrics
Nov 24, 2026
Merged

mscrivo merged 1 commit into
masterfrom
chore/rubocop-ratchet-metrics

Conversation

@mscrivo

@mscrivo mscrivo commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

Replaces the disabled-with-TODO cops with a ratchet: every Metrics cop is on, with its limit set to the current worst case, so complexity can only go down.

Cop Before After
Metrics/AbcSize disabled Max 33 (wrap_link is 32.02)
Metrics/CyclomaticComplexity disabled Max 15
Metrics/PerceivedComplexity disabled Max 17
Metrics/MethodLength Max 30 Max 28
Metrics/ClassLength Max 200 Max 165
Metrics/ModuleLength Max 200 default (no modules)
Metrics/BlockLength Max 50 default, spec/ excluded
Style/Documentation disabled enabled; class comment added

Verified each limit is tight: lowering any by one produces an offense. Specs pass with 100% coverage.

🤖 Generated with Claude Code

Re-enable the AbcSize, Cyclomatic/PerceivedComplexity and Documentation
cops instead of disabling them, with limits set to today's worst
offender so complexity can't grow. Tighten MethodLength and
ClassLength to actual usage, drop the unused ModuleLength override,
and exclude specs from BlockLength.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@mscrivo
mscrivo merged commit ffe2b69 into master Nov 24, 2026
3 checks passed
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