You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Further .rubocop_todo.yml reduction in spec files #183
Follow-up to #169. After #182, the spec suite's .rubocop_todo.yml exclusions are down to Lint/ConstantDefinitionInBlock (removed) and Style/StringConcatenation (relocated). Several more spec-scoped exclusions remain and are candidates for incremental reduction.
Problem
.rubocop_todo.yml still carries these spec-touching exclusions (offense counts as of #182 merge):
remaining 2 of 6 (1 already moved to active_record_models.rb in #182)
unsafe
Lint/MissingSuper
comma_spec.rb
1
-
Lint/NonDeterministicRequireOrder
spec_helper.rb
1
unsafe
Style/RedundantBegin
spec_helper.rb
1
safe
Layout/SpaceAroundMethodCallOperator
users_controller_spec.rb
1
safe
Layout/EmptyLineBetweenDefs
spec/rails_app/rails_app.rb
1
safe
Style/Documentation also excludes spec/**/*, but that's likely an intentional, permanent exclusion (spec/test classes don't need doc comments) rather than a hygiene debt — evaluate case by case, don't treat as a required target.
Proposed approach
Same incremental rule as #169: when touching a spec file for other reasons, fix or narrow its exclusions instead of leaving them. Where a cop is safely autocorrectable, rubocop -A scoped to the specific file plus a spec-suite run to confirm no behavior change is enough; where it's unsafe or non-autocorrectable (Lint/EmptyBlock, Naming/VariableName, Lint/MissingSuper, Style/StringConcatenation, Lint/NonDeterministicRequireOrder), each needs a manual look at whether the flagged code is intentional (e.g. an empty after(:all) do end block, or old-style should == variable naming) before changing it.
Acceptance criteria
At least one additional entry removed or narrowed from .rubocop_todo.yml
No spec behavior changes (same examples, same expectations)
bundle exec rubocop and bundle exec rspec stay green
Depends on
#169, #182 (this list was captured after #182 merged)
Activity