Skip to content

Regenerate .rubocop_todo.yml and fix newly-flagged offenses - #42

Draft
apiology wants to merge 2 commits into
masterfrom
rubocop_todo_style_cleanup
Draft

Regenerate .rubocop_todo.yml and fix newly-flagged offenses#42
apiology wants to merge 2 commits into
masterfrom
rubocop_todo_style_cleanup

Conversation

@apiology

@apiology apiology commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Summary

.rubocop_todo.yml had drifted 112 lines out of sync with what the current
RuboCop/plugin versions actually auto-generate. Regenerates it and fixes
the offenses that surfaces:

  • spec/source/chain_spec.rb: Style/StringLiterals and
    Style/BlockDelimiters cleanup throughout.
  • YARD/CollectionStyle: disabled entirely rather than autocorrected.
    For nested-generic/tuple Hash key types (e.g.
    Hash{Array(String, Array<String>) => ...}), the cop's long-style
    autocorrect flattens the tuple into an ambiguous, non-equivalent list
    (Hash{Array, String, Array, String => ...}) instead of valid
    long-form syntax. Same finding and fix as Spec performance fixes castwide/solargraph#1237.

No behavior changes.

Test plan

  • bundle exec rubocop: clean
  • bundle exec rspec spec/source/chain_spec.rb spec/doc_map_spec.rb spec/api_map_method_spec.rb spec/complex_type_spec.rb: clean
  • bundle exec overcommit --run --diff castwide/master: clean

Generated with Claude Code

apiology added a commit that referenced this pull request Aug 3, 2026
The Hash{Array(String, String) => ...} -> Hash{Array, String, String
=> ...} docstring reformatting in api_map/constants.rb,
api_map/store.rb, doc_map.rb, source_map.rb, and the quote/block-style
cleanup in spec/source/chain_spec.rb weren't related to this PR's
stated purpose (parallel specs, concurrency fixes) - they were fixing
YARD/CollectionStyle and Style/StringLiterals offenses that a fresh
`rubocop --auto-gen-config` surfaces under the currently-installed
RuboCop/rubocop-yard versions but that master's own committed
.rubocop_todo.yml doesn't yet grandfather (a pre-existing drift, not
something this branch introduced).

Revert those files to master's content and add a scoped
YARD/CollectionStyle todo exclusion for the same 4 files, so this
branch stays green without carrying the unrelated reformatting. The
actual fix now lives in a standalone PR:
#42.
Regenerates the RuboCop todo file, which had drifted out of sync
with the current RuboCop/plugin versions (auto-gen-config output
differs by 112 lines from what's currently committed). Fixes the
offenses this surfaces rather than re-excluding them:

- YARD/CollectionStyle: rewrite short-form tuple-key Hash docstrings
  (Hash{Array(String, String) => ...}) to the long form YARD's current
  parser accepts (Hash{Array, String, String => ...}), in
  api_map/constants.rb, api_map/store.rb, and doc_map.rb.
- source_map.rb: silence one YARD/CollectionStyle false positive
  inline rather than widen the todo exclusion.
- spec/source/chain_spec.rb: Style/StringLiterals (single-quoted
  strings) and Style/BlockDelimiters (expect { }.not_to raise_error ->
  expect do end) throughout.

No behavior changes.
Reverts the docstring reformatting from the previous commit: for
nested-generic/tuple Hash key types, rubocop-yard's long-style
autocorrect (Hash{Array(String, Array<String>) => ...} ->
Hash{Array, String, Array, String => ...}) produces syntax that
doesn't preserve the original tuple's meaning - it flattens the
tuple's nested types into an ambiguous flat list rather than valid
long-style syntax. Confirmed against rubocop-yard 1.3.0 / yard 0.9.45.

Disable the cop instead, matching the same finding and fix already
applied in castwide#1237.
@apiology
apiology force-pushed the rubocop_todo_style_cleanup branch from 971dfd3 to e611b90 Compare August 4, 2026 16:50
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