Summary
mage preflight runs cspell only on **/*.go files using .vscode/cspell.yaml, but CI also runs a separate cspell check on docs and miscellaneous files using .vscode/cspell.misc.yaml (workflow: .github/workflows/cspell-misc.yml). This means changes to docs/, SECURITY.md, README.md, and other non-Go files can pass local preflight but fail CI cspell.
Root Cause
| Check |
Glob |
Config |
Scope |
Local mage preflight |
**/*.go |
.vscode/cspell.yaml |
Go source only |
CI cspell-misc.yml |
**/* |
.vscode/cspell.misc.yaml |
Everything except cli/, ext/, templates/, eng/ |
The local preflight step (magefile.go line 221) only passes **/*.go to cspell. There is no local equivalent of the CI cspell-misc.yml workflow.
Impact
Developers adding or editing docs (e.g., architecture specs under docs/) will not see cspell failures locally. This was discovered on PR #7603 where 37 cspell errors in docs/azd-down-resource-group-safety/architecture.md passed local preflight but failed CI.
Proposed Fix
Add a second cspell pass in mage preflight (magefile.go) that mirrors the CI cspell-misc.yml workflow:
// 5b. Spell check (cspell - misc files)
fmt.Println("══ Spell check (cspell-misc) ══")
if err := runStreaming(repoRoot, "cspell", "lint", "**/*",
"--relative", "--config", "./.vscode/cspell.misc.yaml", "--no-progress"); err != nil {
record("cspell-misc", "fail", err.Error())
} else {
record("cspell-misc", "pass", "")
}
This should run from the repo root (not cli/azd/) to match the CI behavior.
References
Summary
mage preflightruns cspell only on**/*.gofiles using.vscode/cspell.yaml, but CI also runs a separate cspell check on docs and miscellaneous files using.vscode/cspell.misc.yaml(workflow:.github/workflows/cspell-misc.yml). This means changes todocs/,SECURITY.md,README.md, and other non-Go files can pass local preflight but fail CI cspell.Root Cause
mage preflight**/*.go.vscode/cspell.yamlcspell-misc.yml**/*.vscode/cspell.misc.yamlThe local preflight step (
magefile.goline 221) only passes**/*.goto cspell. There is no local equivalent of the CIcspell-misc.ymlworkflow.Impact
Developers adding or editing docs (e.g., architecture specs under
docs/) will not see cspell failures locally. This was discovered on PR #7603 where 37 cspell errors indocs/azd-down-resource-group-safety/architecture.mdpassed local preflight but failed CI.Proposed Fix
Add a second cspell pass in
mage preflight(magefile.go) that mirrors the CIcspell-misc.ymlworkflow:This should run from the repo root (not
cli/azd/) to match the CI behavior.References
.github/workflows/cspell-misc.ymlcli/azd/magefile.golines 219-226.vscode/cspell.misc.yaml