Azure / azure-sdk-for-cpp

This repository is for active development of the Azure SDK for C++. For consumers of the SDK we recommend visiting our versioned developer docs at https://azure.github.io/azure-sdk-for-cpp.
MIT License
179 stars 128 forks source link

Fix spelling errors in code #1277

Closed danieljurek closed 3 years ago

danieljurek commented 3 years ago

Follow this process to eliminate spelling errors: https://dev.azure.com/azure-sdk/internal/_wiki/wikis/internal.wiki/406/Spell-Checking

See ignorePaths in cspell.json (when checked in https://github.com/Azure/azure-sdk-for-cpp/pull/1261) to find files which contain spelling errors. Files that are in ignorePaths will not be checked for spelling errors until they are removed from ignorePaths.

Spelling errors may be as innocuous as misspelled words in comments, false positives (words that are correctly spelled but not recognized by the spell checker), or more severe resulting in interface changes (e.g. changing the name of a class or method name). Spelling errors should be examined and fixed by an appropriate SME.

This work item might be larger than a single issue. It might make sense to convert this to an epic and create issues for different areas of ownership (like per-service or per-package).

ahsonkhan commented 3 years ago

This effort is great.

I had used cspell in the past, when working in the Embedded C SDK, and the primary concern that came up was false positive and having to maintain a list of words that are considered "correct", such as mutex, posix, seelaso, etc. That list kept growing, for example:

"cSpell.words": [
    "AZURERTOS",
    "Allman",
    "Browsable",
    "CONNACK",
    "COUNTOF",
    "CPUs",
    "Clickability",
    "Cobertura",
    "DCMAKE",
    "DLOGGING",
    "DPAPI",
    "DPRECONDITIONS",
    "DTMI",
    "DTRANSPORT",
    "DUNIT",
    "Doxyfile",
    "Doxywizard",
    "Espressif",
    "Fdevices",
    "Fmessages",
    "Fmodules",
    "Fuseragent",
    "Glyphicons",
    "HMAC",
    "HTAB",
    "HTTPHEADER",
    "Halflings",
    "Hashtable",
    "ICACHE",
    "IRAM",
    "IROM",
    "ISRs",
    "IntelliJ",
    "Javadoc",
    "KEEPALIVE",
    "KUSTO",
    "Karp",
    "Kitware",
    "LASTEXITCODE",
    "LLVM",
    "MATCHALL",
    "MQTTCLIENT",
    "MSRC",
    "MSVC",
    "Mocka",
    "NIST",
    "NOMINMAX",
    "O'Leary",
    "Paho",
    "READMEs",
    "RESOURCEGROUP",
    "RODATA",
    "SDK's",
    "SDKs",
    "SIGINT",
    "SLAs",
    "SNTP",
    "SPDX",
    "STREQUAL",
    "SUBDIRS",
    "TEAMPROJECTID",
    "TOOLCHAIN",
    "TPMs",
    "Testfile",
    "VCHAR",
    "VCPKG",
    "VERYSILENT",
    "WIFI",
    "Wcast",
    "Wconversion",
    "Wdocumentation",
    "Werror",
    "Wextra",
    "Wfloat",
    "Wlogical",
    "Wmissing",
    "Wpointer",
    "Wshadow",
    "Wuninitialized",
    "Wunused",
    "Xclang",
    "abspath",
    "apidoc",
    "atod",
    "atou",
    "atox",
    "azcopy",
    "aziot",
    "azrtos",
    "azuresdk",
    "azuresdkdocs",
    "blobstorage",
    "buildable",
    "buildsystems",
    "buildtools",
    "chinaeast",
    "chmod",
    "chown",
    "cmake",
    "cmdlet",
    "cmocka",
    "codeowners",
    "codewrapper",
    "cognitiveservices",
    "contoso",
    "ctest",
    "deps",
    "docfx",
    "docurl",
    "doxygen",
    "doxygenversion",
    "drwxr",
    "ecdsa",
    "elif",
    "embc",
    "esptool",
    "extensionmethods",
    "fcomment",
    "fqdn",
    "fregistrations",
    "gcov",
    "gcovr",
    "githubio",
    "globaltool",
    "glyphicon",
    "hljs",
    "hotfix",
    "iotdps",
    "iothub",
    "kbit",
    "keyvault",
    "lcov",
    "libc",
    "libcmocka",
    "libcurl",
    "libiconv",
    "libssl",
    "microcontroller",
    "microcontrollers",
    "mkdir",
    "mqtt",
    "mspremier",
    "mutex",
    "myiothub",
    "myusername",
    "nodemcu",
    "nohttp",
    "noplatform",
    "openssl",
    "operationid",
    "parametername",
    "posix",
    "prependpath",
    "printf",
    "println",
    "projectname",
    "publishedversions",
    "pullrequest",
    "pwsh",
    "relpath",
    "reportgenerator",
    "reporttypes",
    "repos",
    "retriable",
    "retval",
    "rwxr",
    "seealso",
    "setvariable",
    "setx",
    "sideaffix",
    "sidefilter",
    "sidenav",
    "sidetoc",
    "sidetoggle",
    "somevalue",
    "sourceurl",
    "spinlock",
    "ssid",
    "startswith",
    "strlen",
    "struct",
    "structs",
    "subfolders",
    "submodules",
    "targetdir",
    "transcoding",
    "unescaping",
    "versionselector",
    "westus",
    "winssl",
    "xcode",
    "xvzf"
  ]

The other (albeit minor) issue I noticed was that it wouldn't catch all typos, and left some glaring ones in comments. I can't recall on the top of my head now, but I discovered some in code review that the VS Code extension wasn't flagging.

RickWinter commented 3 years ago

@ahsonkhan Please run the tool over the code base and fix spelling issues. Can you also update the cost estimate.

ahsonkhan commented 3 years ago

This issue is not yet actionable. Also, this shouldn't be considered as blocking-release.

ahsonkhan commented 3 years ago

The issue is blocked on https://github.com/Azure/azure-sdk-for-cpp/issues/1260

ahsonkhan commented 3 years ago

@danieljurek once the SDK is "green", should we turn the CI warnings into errors so we can remain green?

ahsonkhan commented 3 years ago

Fixed in https://github.com/Azure/azure-sdk-for-cpp/pull/2209

RickWinter commented 3 years ago

Inadvertent reopen, closing