Repository navigation
fix(workspace): guard undotted typos.toml against dual configs - #1289
Merged
Merged
Conversation
Add failing cases for #1280: an undotted typos.toml (with no .typos.toml) must be treated like the legacy _typos.toml case — consumer file stays the single active config, template .typos.toml not shipped, mirrored in --preview, and the skip is surfaced. Includes a regression guard for the combo case where a curated .typos.toml is also present (preserve-list path). Refs: #1280
The `typos` tool reads config from .typos.toml, _typos.toml, or the undotted typos.toml. The scaffold guarded the first two but not the undotted spelling, so a consumer carrying typos.toml (and no .typos.toml) also received the template .typos.toml — two active configs, the curated allowlist silently shadowed. Extend the #913 copy-time guard to also match an undotted typos.toml: the consumer file stays the single active config, the template copy is not shipped, and the skip is mirrored in --preview and named in the scaffold surface message. Refs: #1280
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
The
typostool reads its config fromtypos.toml,.typos.toml, or_typos.toml. The scaffold guarded the preserved.typos.toml(#913) and the legacy_typos.toml(copy-time exclude), but an undottedtypos.tomlescaped the guard: the template.typos.tomlwas shipped alongside it, leaving two active configs and silently shadowing the consumer's curated allowlist.The #913 copy-time branch now treats any alternate spelling (
typos.tomland/or_typos.toml, with no.typos.tomlpresent) as the consumer's single active config: the template copy is not shipped, the skip is mirrored in--previewvia the sharedMODE_CONFIG_EXCLUDESSSoT, and the scaffold surface message names the triggering file(s).Changes
assets/init-workspace.sh: extend the legacy-typos exclude to undottedtypos.toml(TYPOS_ALT_CONFIGSrecords the triggering spellings); generalize the surface message; update enumerating comments.tests/bats/init-workspace.bats: 4 new fix(workspace): undotted typos.toml escapes the #913 dual-config guard #1280 cases (dual-config guard,--previewADDED truthfulness, surface message, both-files no-misfire combo).CHANGELOG.md(+ generated devcontainer mirror): Fixed entry.Test evidence
55c9f3b3), fix in11b2963c.bats tests/bats/init-workspace.bats --filter "913|1196|1280": 9/9 ok (new cases + all fix(workspace): scaffold upgrade clobbers a customized .typos.toml (dual-config corruption) #913/init-workspace.sh --preview reports rsync-excluded files as ADDED #1196 regressions).prek run --all-files: green.Merge order
Part of the #1280–#1285 solo-adoption batch; recommended merge order #1281 → #1280 → #1283 → #1282 → #1284 → #1285 (shared
init-workspace.sh/CHANGELOG surface).Closes #1280