From aa31b84b821e87fa9ca5c196ca3bd89b7bec916b Mon Sep 17 00:00:00 2001 From: Chuck Adams Date: Sun, 22 Dec 2024 11:12:04 -0700 Subject: [PATCH 1/3] ci: add errata-ai/vale-action for spellchecking --- .github/workflows/spellcheck.yml | 11 +++++++++++ .vale.ini | 6 ++++++ .vale/config/vocabularies/AspirePress/accept.txt | 3 +++ .vale/config/vocabularies/Misc/accept.txt | 1 + .vale/config/vocabularies/Technical/accept.txt | 3 +++ 5 files changed, 24 insertions(+) create mode 100644 .github/workflows/spellcheck.yml create mode 100644 .vale.ini create mode 100644 .vale/config/vocabularies/AspirePress/accept.txt create mode 100644 .vale/config/vocabularies/Misc/accept.txt create mode 100644 .vale/config/vocabularies/Technical/accept.txt diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml new file mode 100644 index 0000000..be06851 --- /dev/null +++ b/.github/workflows/spellcheck.yml @@ -0,0 +1,11 @@ +name: Spellcheck +on: [pull_request] + +jobs: + vale: + name: Spellcheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: errata-ai/vale-action@v2.1.1 + diff --git a/.vale.ini b/.vale.ini new file mode 100644 index 0000000..615d1bc --- /dev/null +++ b/.vale.ini @@ -0,0 +1,6 @@ +StylesPath = .vale +MinAlertLevel = suggestion +Vocab = AspirePress, Technical, Misc + +[*.md] +BasedOnStyles = Vale diff --git a/.vale/config/vocabularies/AspirePress/accept.txt b/.vale/config/vocabularies/AspirePress/accept.txt new file mode 100644 index 0000000..0288576 --- /dev/null +++ b/.vale/config/vocabularies/AspirePress/accept.txt @@ -0,0 +1,3 @@ +AspirePress +ClassicPress +WordPress diff --git a/.vale/config/vocabularies/Misc/accept.txt b/.vale/config/vocabularies/Misc/accept.txt new file mode 100644 index 0000000..6ae3617 --- /dev/null +++ b/.vale/config/vocabularies/Misc/accept.txt @@ -0,0 +1 @@ +hominem diff --git a/.vale/config/vocabularies/Technical/accept.txt b/.vale/config/vocabularies/Technical/accept.txt new file mode 100644 index 0000000..52329bb --- /dev/null +++ b/.vale/config/vocabularies/Technical/accept.txt @@ -0,0 +1,3 @@ +(?i)css +(?i)nginx +(?i)webpack From 430e872122a5e63e3028d509090f3a93a089a232 Mon Sep 17 00:00:00 2001 From: Chuck Adams Date: Sun, 22 Dec 2024 12:16:49 -0700 Subject: [PATCH 2/3] ci: configure vale and reviewdog --- .github/workflows/spellcheck.yml | 14 ++++++++++++-- .vale.ini | 3 +++ .vale/config/vocabularies/AspirePress/accept.txt | 6 ++++++ .vale/config/vocabularies/AspirePress/reject.txt | 5 +++++ README.md | 4 ++-- 5 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 .vale/config/vocabularies/AspirePress/reject.txt diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index be06851..5e7f681 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -6,6 +6,16 @@ jobs: name: Spellcheck runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: errata-ai/vale-action@v2.1.1 + - name: Checkout + uses: actions/checkout@v4 + - name: Spellcheck + uses: errata-ai/vale-action@v2.1.1 + with: + version: latest + files: all + debug: false + reporter: github-check # https://github.com/reviewdog/reviewdog#reporters + fail_on_error: true + level: error + filter_mode: added diff --git a/.vale.ini b/.vale.ini index 615d1bc..08596d6 100644 --- a/.vale.ini +++ b/.vale.ini @@ -1,5 +1,8 @@ +# https://vale.sh/docs/topics/config/ StylesPath = .vale MinAlertLevel = suggestion + +# https://vale.sh/docs/topics/vocab/ Vocab = AspirePress, Technical, Misc [*.md] diff --git a/.vale/config/vocabularies/AspirePress/accept.txt b/.vale/config/vocabularies/AspirePress/accept.txt index 0288576..2c3ff2b 100644 --- a/.vale/config/vocabularies/AspirePress/accept.txt +++ b/.vale/config/vocabularies/AspirePress/accept.txt @@ -1,3 +1,9 @@ +# accept.txt - words considered acceptable spellings +# +# lines beginning with '#' are ignored. +# each line is one word or regex, and is case-sensitive. +# prefix with (?i) to make case-insensitive. + AspirePress ClassicPress WordPress diff --git a/.vale/config/vocabularies/AspirePress/reject.txt b/.vale/config/vocabularies/AspirePress/reject.txt new file mode 100644 index 0000000..7f13418 --- /dev/null +++ b/.vale/config/vocabularies/AspirePress/reject.txt @@ -0,0 +1,5 @@ +# reject.txt - words always considered to be spelling errors +# +# lines beginning with '#' are ignored. +# each line is one word or regex, and is case-sensitive. +# prefix with (?i) to make case-insensitive. diff --git a/README.md b/README.md index 38c3903..a333972 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ # Governance -Governance documentation for AspirePress. You can view this documentation at -[AspirePress Governance](https://governance.aspirepress.org). \ No newline at end of file +Governance documentation for AspirePress. You can view this documentation at +[AspirePress Governance](https://governance.aspirepress.org). From cbba93523c8d319dfb7c0dbfd3b06bb342aa31ac Mon Sep 17 00:00:00 2001 From: Chuck Adams Date: Sun, 22 Dec 2024 12:24:15 -0700 Subject: [PATCH 3/3] ci: change workflow trigger on any PR and pushes to main --- .github/workflows/spellcheck.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index 5e7f681..ba78198 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -1,5 +1,9 @@ name: Spellcheck -on: [pull_request] + +on: + pull_request: + push: + branches: [ main ] jobs: vale: