Skip to content

Local mage preflight cspell does not cover docs/misc files (CI cspell-misc gap) #7604

@jongio

Description

@jongio

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions