From b8c74fd80b415fa1ebb6fa787d454694c39e0fd5 Mon Sep 17 00:00:00 2001 From: Wes Haggard Date: Thu, 30 Nov 2023 11:22:36 -0800 Subject: [PATCH] Update spell checking instructions (#26874) Having one custom-words.txt for the entire repo has been causing a number of merging issues so we are trying to move away from it and instead have teams use override in the cspell configuration file directly. --- documentation/ci-fix.md | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/documentation/ci-fix.md b/documentation/ci-fix.md index f426b165812..0b928e05dfb 100644 --- a/documentation/ci-fix.md +++ b/documentation/ci-fix.md @@ -10,9 +10,31 @@ Most guides here require for you to have `npm` installed, which you can get by i ## Spell check -Please add your words to `./custom-words.txt` if you think you have the correct spell. +If you receive a spelling failure either fix the spelling to match or if there are words that need to be suppressed for your service then add the word to the override list in [cspell.json](https://github.com/Azure/azure-rest-api-specs/blob/main/cSpell.json). Either +add to your existing section or create a new section for your specific spec or service family if the work is more generally used in losts of files under your service. +``` + "overrides": [ + ... example of specific file override + { + "filename": "**/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2015-03-01-preview/cluster.json", + "words": [ + "saskey" + ] + } + ... example of specific service family override + { + "filename": "**/specification/cognitiveservices/**/*.json", + "words": [ + "flac", + "mpga" + ] + } +``` +Words are case-insensitive so use lower case for the word list. -If your problem is some existing error name that is not a word and need to suppress the error in that file (and don't want to add to custom-words.txt), you can add it to `./cSpell.txt`. +If you need more information on see [cspell configuration](https://cspell.org/configuration/). + +*Note*: We are trying to move away from one shared dictionary file so try and avoid editing custom-words.txt in the root as it will likely go away in the future. ## Prettier check