Skip to content

Commit

Permalink
HDDS-11970. Ignore markdown code blocks in cspell (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
errose28 authored Dec 21, 2024
1 parent 8de5faa commit fc6172b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ Docusaurus provides many options for laying out documentation pages and their me

#### Spelling

The file names and content of all markdown pages are checked for spelling mistakes using [cspell](https://cspell.org/) as part of GitHub actions. Spelling can also be checked locally by running the script [.github/scripts/spelling.sh](.github/scripts/spelling.sh). This requires you to have pnpm's dev dependencies installed on your machine for cspell to work (run `pnpm install --dev`).
As part of the GitHub Actions CI, all markdown pages will be checked for spelling mistakes using [cspell](https://cspell.org/). Markdown code blocks are excluded from spelling checks. Spelling can also be checked locally by running the script [.github/scripts/spelling.sh](.github/scripts/spelling.sh). This requires you to have pnpm's dev dependencies installed on your machine for cspell to work (run `pnpm install --dev`).

**If spell check fails for words that are correct but not recognized:**

Expand Down
20 changes: 20 additions & 0 deletions cspell.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,26 @@ import:
- "@cspell/dict-shell/cspell-ext.json"
- "@cspell/dict-docker/cspell-ext.json"

languageSettings:
- languageId:
- markdown
- mdx
ignoreRegExpList:
- markdown_code_block
- markdown_inline_code

patterns:
- name: markdown_code_block
pattern: |
/
^(\s*`{3,}).* # match the ```
[\s\S]*? # the block of code
^\1 # end of the block
/gmx
- name: markdown_inline_code
pattern: |
`[^`]*`
flagWords:
# Write "quasi-closed" instead of "quasi closed".
- quasi
Expand Down
6 changes: 0 additions & 6 deletions docs/08-developer-guide/04-project/02-release-guide.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
---
sidebar_label: Release Manager Guide

# Custom words specific to this page:
# cSpell:ignore protoroot codesigningkey lockdir pinentry gpgconf orgapacheozone

# On this page, ignore CLI options used with -D or -P.
# cSpell:ignoreRegExp -(D|P)[a-z\.,]+([\s]|=)
---

# Apache Release Manager Guide
Expand Down

0 comments on commit fc6172b

Please sign in to comment.