From 202d42ccc677f2457927a96a674c1333fe83a5dd Mon Sep 17 00:00:00 2001 From: Zachary Tucker Date: Fri, 21 Apr 2023 09:59:59 -0400 Subject: [PATCH 1/3] chore(workflow): add basic spell checking --- .github/workflows/pr-validate.yml | 13 +++++++++++++ .spellcheck.yaml | 19 +++++++++++++++++++ .wordlist.txt | 0 3 files changed, 32 insertions(+) create mode 100644 .spellcheck.yaml create mode 100644 .wordlist.txt diff --git a/.github/workflows/pr-validate.yml b/.github/workflows/pr-validate.yml index d2aa2b2..c4e8592 100644 --- a/.github/workflows/pr-validate.yml +++ b/.github/workflows/pr-validate.yml @@ -31,3 +31,16 @@ jobs: with: name: oscal.io-content path: _site + spellcheck: + name: Check spelling + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: Spell check + uses: rojopolis/spellcheck-github-actions@0.30.0 + - name: Check wordlist.txt is sorted + run: | + sort -fu .wordlist.txt | diff -Nau .wordlist.txt - diff --git a/.spellcheck.yaml b/.spellcheck.yaml new file mode 100644 index 0000000..72584b4 --- /dev/null +++ b/.spellcheck.yaml @@ -0,0 +1,19 @@ +matrix: + - name: Markdown + aspell: + ignore-case: true + lang: en + dictionary: + wordlists: + - .wordlist.txt + encoding: utf-8 + pipeline: + - pyspelling.filters.markdown: + - pyspelling.filters.html: + comments: false + ignores: + - code + - pre + sources: + - '_tools/*.md' + - '_events/*.md' diff --git a/.wordlist.txt b/.wordlist.txt new file mode 100644 index 0000000..e69de29 From f829ae3b989c1ccf87b60acbcc134edb3ac73c2d Mon Sep 17 00:00:00 2001 From: Zachary Tucker Date: Fri, 21 Apr 2023 10:04:54 -0400 Subject: [PATCH 2/3] Fix spelling errors --- .wordlist.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.wordlist.txt b/.wordlist.txt index e69de29..229b55d 100644 --- a/.wordlist.txt +++ b/.wordlist.txt @@ -0,0 +1,11 @@ +ATO +FedRAMP +Javan +NIST +OSCAL +Pirooz +SSPs +https +https://goo.gl/maps/NPJYJaB9roXrSZ9D9 +liboscal +usnistgov From 61a5745c8dfdcc570751c2390f3d34f3b9b19320 Mon Sep 17 00:00:00 2001 From: Zachary Tucker Date: Fri, 21 Apr 2023 13:21:47 -0400 Subject: [PATCH 3/3] Ignore front matter --- .spellcheck.yaml => .spellcheck.yml | 10 ++++++++++ .wordlist.txt | 1 - 2 files changed, 10 insertions(+), 1 deletion(-) rename .spellcheck.yaml => .spellcheck.yml (52%) diff --git a/.spellcheck.yaml b/.spellcheck.yml similarity index 52% rename from .spellcheck.yaml rename to .spellcheck.yml index 72584b4..4c4c365 100644 --- a/.spellcheck.yaml +++ b/.spellcheck.yml @@ -8,6 +8,16 @@ matrix: - .wordlist.txt encoding: utf-8 pipeline: + - pyspelling.filters.context: + context_visible_first: true + escapes: '\\[\\`~]' + delimiters: + # Ignore multiline content between fences (fences can have 3 or more back ticks) + # ``` + # content + # ``` + - open: '(?s)^(?P *-{3,})$' + close: '^(?P=open)$' - pyspelling.filters.markdown: - pyspelling.filters.html: comments: false diff --git a/.wordlist.txt b/.wordlist.txt index 229b55d..c680cc1 100644 --- a/.wordlist.txt +++ b/.wordlist.txt @@ -6,6 +6,5 @@ OSCAL Pirooz SSPs https -https://goo.gl/maps/NPJYJaB9roXrSZ9D9 liboscal usnistgov