This is an automated email from the ASF dual-hosted git repository.

erose pushed a commit to branch HDDS-9225-website-v2
in repository https://gitbox.apache.org/repos/asf/ozone-site.git


The following commit(s) were added to refs/heads/HDDS-9225-website-v2 by this 
push:
     new eebd3230 HDDS-10667. Improvements to spelling checks. (#89)
eebd3230 is described below

commit eebd3230e85e52cea77412d9893caaf970b7f4eb
Author: Ethan Rose <[email protected]>
AuthorDate: Tue Apr 16 10:05:37 2024 -0700

    HDDS-10667. Improvements to spelling checks. (#89)
---
 .github/resource/spelling_tips.md |  5 +++--
 .github/scripts/spelling.sh       | 10 ++++++++--
 .markdownlint.yaml                | 19 ++++++++++++-------
 cspell.yaml                       | 11 +++++++++++
 4 files changed, 34 insertions(+), 11 deletions(-)

diff --git a/.github/resource/spelling_tips.md 
b/.github/resource/spelling_tips.md
index c9765f77..54b8b294 100644
--- a/.github/resource/spelling_tips.md
+++ b/.github/resource/spelling_tips.md
@@ -3,5 +3,6 @@
 Spelling can be checked locally by running the script 
*.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:**
-  - Option 1: If the word is relevant for the whole Ozone project, add it to 
the `words` list in *cspell.yaml* so that it is considered valid.
-  - Option 2: If the word is only relevant for one specific page, add an 
[inline directive](https://cspell.org/configuration/document-settings/) as a 
comment in the markdown frontmatter of that page only.
+
+- Option 1: If the word is relevant for the whole Ozone project, add it to the 
`words` list in *cspell.yaml* so that it is considered valid.
+- Option 2: If the word is only relevant for one specific page, add an [inline 
directive](https://cspell.org/configuration/document-settings/) as a comment in 
the markdown front matter of that page only.
diff --git a/.github/scripts/spelling.sh b/.github/scripts/spelling.sh
index c97131a6..5bb0c506 100755
--- a/.github/scripts/spelling.sh
+++ b/.github/scripts/spelling.sh
@@ -20,10 +20,16 @@ root="$(git rev-parse --show-toplevel)"
 
 rc=0
 
-echo 'Checking document content...'
+printf '%s\n' 'Checking document content...'
 pnpm cspell lint --root="$root" --no-progress --show-context '**/*.md' 
'**/_category_.yml' || rc="$?"
 
-echo 'Checking file names...'
+printf '\n%s\n' 'Checking file names...'
 find "$root"/docs "$root"/src/pages | pnpm cspell --no-progress --show-context 
stdin://'File Name' || rc="$?"
 
+if [ "$rc" != 0 ]; then
+  # TODO Update this link to master when the new website's branch is merged.
+  printf '\n%s\n%s\n' 'Spell check failed. See CONTRIBUTING.md for help fixing 
false positive spelling errors:' \
+    
'https://github.com/apache/ozone-site/blob/HDDS-9225-website-v2/CONTRIBUTING.md#spelling'
 1>&2
+fi
+
 exit $rc
diff --git a/.markdownlint.yaml b/.markdownlint.yaml
index 8895789e..cb218b36 100644
--- a/.markdownlint.yaml
+++ b/.markdownlint.yaml
@@ -77,6 +77,7 @@ proper-names:
   - CLI
   - RPC
   - EC
+  - BCSID
   - SPNEGO
   - SASL
   - TLS
@@ -103,14 +104,18 @@ proper-names:
   - pnpm
   - S3
   - Hadoop
-  # Enforce capitalization for these words only when they are used in 
sentences (surrounded by spaces).
+  - UUID
+  - IP address
+  # Enforce capitalization for these words only when they are used in 
sentences (preceded by a space).
   # Other uses in repo names or links like 
[apache/ozone](https://github.com/apache/ozone) are ok.
-  - " Ratis "
-  - " Ozone "
-  - " Apache "
-  - " ASF "
-  - " HTTP "
-  - " HTTPS "
+  - " Ratis"
+  - " Ozone"
+  - " Apache"
+  - " ASF"
+  - " HTTP"
+  - " http:"
+  - " HTTPS"
+  - " https:"
 
 # Indentation should not be used to indicate a multi-line code block.
 code-block-style:
diff --git a/cspell.yaml b/cspell.yaml
index 2d7b30c8..f58115e4 100644
--- a/cspell.yaml
+++ b/cspell.yaml
@@ -33,6 +33,10 @@ import:
 - "@cspell/dict-shell/cspell-ext.json"
 - "@cspell/dict-docker/cspell-ext.json"
 
+flagWords:
+# Write "quasi-closed" instead of "quasi closed".
+- quasi
+
 # List of words to be always considered correct.
 # Case insensitive.
 words:
@@ -51,6 +55,13 @@ words:
 - OBS
 - HttpFS
 - safemode
+- mis-replicate
+- mis-replication
+- mis-replicated
+- BCSID
+- EC
+- quasi-close
+- quasi-closed
 # Other systems' words
 - KDC
 - classpath


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to