Azure / azure-sdk-tools

Tools repository leveraged by the Azure SDK team.
MIT License
110 stars 173 forks source link

cspell.json should always be ignored #8908

Open heaths opened 2 weeks ago

heaths commented 2 weeks ago

I recently made some changes to .vscode/cspell.json but the CI failed because it checked itself:

npx cspell lint --config /mnt/vss/_work/1/s/.vscode/cspell.json --no-must-find-files --root /mnt/vss/_work/1/s/ --relative

1/5 /mnt/vss/_work/1/s/.vscode/cspell.json 408.40ms X

2/5 /mnt/vss/_work/1/s/Cargo.toml 35.70ms

3/5 /mnt/vss/_work/1/s/LICENSE 14.49ms

4/5 /mnt/vss/_work/1/s/sdk/eventhubs/azure_messaging_eventhubs/Cargo.toml 9.97ms

5/5 /mnt/vss/_work/1/s/sdk/typespec/typespec_client_core/src/http/pageable.rs 34.36ms
CSpell: Files checked: 5, Issues found: 4 in 1 files
cspell run complete, restoring original configuration and removing temp file.
##[error]./.vscode/cspell.json:80:10 - Unknown word (adfs)
##[error]./.vscode/cspell.json:81:10 - Unknown word (azureauth)
##[error]./.vscode/cspell.json:82:10 - Unknown word (msal)
##[error]./.vscode/cspell.json:83:10 - Unknown word (imds)
##[error]Spelling errors detected. To correct false positives or learn about spell checking see: https://aka.ms/azsdk/engsys/spellcheck

Our spell-checking script - that figures out what files to scan - should always ignore the config file. It contains all the words to skip. I've added .vscode/cspell.json to our ignorePaths list, but seems the outer script could do this universally.

heaths commented 2 weeks ago

I also opened https://github.com/streetsidesoftware/cspell/issues/6190 against cspell to approach this universally.