Regenerate .rubocop_todo.yml and fix newly-flagged offenses - #42
Draft
apiology wants to merge 2 commits into
Draft
Regenerate .rubocop_todo.yml and fix newly-flagged offenses#42apiology wants to merge 2 commits into
apiology wants to merge 2 commits into
Conversation
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
force-pushed
the
rubocop_todo_style_cleanup
branch
from
August 4, 2026 16:50
971dfd3 to
e611b90
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.rubocop_todo.ymlhad drifted 112 lines out of sync with what the currentRuboCop/plugin versions actually auto-generate. Regenerates it and fixes
the offenses that surfaces:
spec/source/chain_spec.rb:Style/StringLiteralsandStyle/BlockDelimiterscleanup 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-styleautocorrect flattens the tuple into an ambiguous, non-equivalent list
(
Hash{Array, String, Array, String => ...}) instead of validlong-form syntax. Same finding and fix as Spec performance fixes castwide/solargraph#1237.
No behavior changes.
Test plan
bundle exec rubocop: cleanbundle exec rspec spec/source/chain_spec.rb spec/doc_map_spec.rb spec/api_map_method_spec.rb spec/complex_type_spec.rb: cleanbundle exec overcommit --run --diff castwide/master: cleanGenerated with Claude Code