Problem
crates/xtask-spellcheck/src/main.rs hardcodes six leading spaces in TYPOS_STEP_PREFIX and then searches for the typos step using contains(...) before calling strip_prefix(...).
That makes the extractor depend on the uses: line starting with exactly six leading spaces, like:
" uses: crate-ci/typos@v"
A valid reindent of .github/workflows/main.yml can move the line to a different indentation width (for example, 8 spaces instead of 6). In that case the line still contains the hardcoded substring, but it no longer starts with it, so extraction fails with:
Could not find typos version in workflow
Steps
- Reindent the entire
jobs: subtree in .github/workflows/main.yml by two spaces. The workflow remains valid YAML, but the spellcheck action line changes from:
to:
- Run the xtask, for example:
cargo run -p xtask-spellcheck
- Observe that version extraction fails before
typos runs.
Possible Solution(s)
No response
Notes
This issue is not end-user-facing, but it makes xtask-spellcheck fragile to harmless workflow formatting changes and can block contributors or CI maintainers from running the spellcheck xtask locally after reformatting or refactoring the workflow file.
Version
Problem
crates/xtask-spellcheck/src/main.rshardcodes six leading spaces inTYPOS_STEP_PREFIXand then searches for the typos step usingcontains(...)before callingstrip_prefix(...).That makes the extractor depend on the
uses:line starting with exactly six leading spaces, like:" uses: crate-ci/typos@v"A valid reindent of
.github/workflows/main.ymlcan move the line to a different indentation width (for example, 8 spaces instead of 6). In that case the line still contains the hardcoded substring, but it no longer starts with it, so extraction fails with:Steps
jobs:subtree in.github/workflows/main.ymlby two spaces. The workflow remains valid YAML, but the spellcheck action line changes from:to:
typosruns.Possible Solution(s)
No response
Notes
This issue is not end-user-facing, but it makes
xtask-spellcheckfragile to harmless workflow formatting changes and can block contributors or CI maintainers from running the spellcheck xtask locally after reformatting or refactoring the workflow file.Version