MicrosoftDocs / WSL

Source code behind the Windows Subsystem for Linux documentation.
https://docs.microsoft.com/windows/wsl
Other
1.9k stars 563 forks source link

Add cspell #1755

Closed mrienstra closed 11 months ago

mrienstra commented 1 year ago

Quick disclaimer, got a bit carried away. After https://github.com/MicrosoftDocs/WSL/pull/1745 (minor 1-letter spelling fix) merged, I figured I'd use the "Code Spell Checker" VS Code extension (repo) to find more spelling issues.

Then I figured I'd add support for "Code Spell Checker". Then support for running cspell (which powers "Code Spell Checker") as a pre-commit hook, using pre-commit (repo), as per this.

I found and fixed 12 spelling errors, removed one unnecessary user name (artur), and changed one instance of UK spelling to US spelling (for consistency, though if desired, cspell can easily be configured to support both).

I'll mark this as a draft, as I should've opened an issue first. If you'd like to give it a try, some notes:

  1. I added .vscode/extensions.json which will recommend (if in VS Code) that you install the "Code Spell Checker" VS Code extension.
  2. .vscode/cspell.json has a list of 486 words, surely some of these represent typos that escaped me, as quite a few are fairly esoteric. If the usage of "Code Spell Checker" and/or cspell is accepted, this list will need to be scrutinized by someone more familiar with these terms, to make sure it's not inadvertently enshrining errors. I removed many duplicates, and made several more specific, e.g.
    • "CONFIG_NR_CPUS" instead of "CPUS"
    • "O_TRUNC" instead of "TRUNC"
  3. You'll need to install pre-commit & run pre-commit install to set up the git hook scripts, if you want to try those. I added some extra stuff from pre-commit/pre-commit-hooks to .pre-commit-config.yaml to show what it can do.
  4. So far, I've only checked the .md files with cspell, but I haven't configured it to ignore other files, so that's something that would need to be solidified.
  5. You can tell cspell (and by extension "Code Spell Checker") to ignore words on a "per file" or "per line" basis, which might be a better approach in some cases than what I've done in this PR, which is adding everything to .vscode/cspell.json.
learn-build-service-prod[bot] commented 1 year ago

Learn Build status updates of commit 636473b:

:white_check_mark: Validation status: passed

File Status Preview URL Details
.pre-commit-config.yaml :white_check_mark:Succeeded
.vscode/cspell.json :white_check_mark:Succeeded
.vscode/extensions.json :white_check_mark:Succeeded
WSL/connect-usb.md :white_check_mark:Succeeded View
WSL/file-permissions.md :white_check_mark:Succeeded View
WSL/release-notes.md :white_check_mark:Succeeded View
WSL/troubleshooting.md :white_check_mark:Succeeded View
WSL/tutorials/wsl-containers.md :white_check_mark:Succeeded View

For more details, please refer to the build report.

For any questions, please:

craigloewen-msft commented 1 year ago

Thank you for this submission! Microsoft docs has its own list of tools and procedures, and so we aren't adding a VS Code extension to this repo. Can you please edit this submission to remove the VS Code extension for CSpell? And then I can accept it to take in the spelling fixes.

Thanks!

learn-build-service-prod[bot] commented 1 year ago

Learn Build status updates of commit 3f56c48:

:bulb: Validation status: suggestions

File Status Preview URL Details
WSL/release-notes.md :bulb:Suggestion View Details
WSL/connect-usb.md :white_check_mark:Succeeded View
WSL/file-permissions.md :white_check_mark:Succeeded View
WSL/troubleshooting.md :white_check_mark:Succeeded View
WSL/tutorials/wsl-containers.md :white_check_mark:Succeeded View

WSL/release-notes.md

For more details, please refer to the build report.

Note: Links can become broken if there are changes on the target sites. If you think the validation result is a false alarm, please use SiteHelp with option 'Content authoring and publishing -> False alarm on broken link validation' to report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

mrienstra commented 1 year ago

@craigloewen-msft, you got it, removed VS Code extension & pre-commit hook changes, leaving only spelling fixes.

mattwojo commented 11 months ago

Thank you @mrienstra! Appreciate all of the clean up! Merging. :)

learn-build-service-prod[bot] commented 11 months ago

Learn Build status updates of commit b193588:

:bulb: Validation status: suggestions

File Status Preview URL Details
WSL/release-notes.md :bulb:Suggestion View Details
WSL/connect-usb.md :white_check_mark:Succeeded View
WSL/file-permissions.md :white_check_mark:Succeeded View
WSL/troubleshooting.md :white_check_mark:Succeeded View
WSL/tutorials/wsl-containers.md :white_check_mark:Succeeded View

WSL/release-notes.md

For more details, please refer to the build report.

Note: Links can become broken if there are changes on the target sites. If you think the validation result is a false alarm, please use SiteHelp with option 'Content authoring and publishing -> False alarm on broken link validation' to report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please: