From 3b446d40cace572aafc856b9adfe249745258eb8 Mon Sep 17 00:00:00 2001 From: Serdar Dalgic Date: Mon, 14 Nov 2022 13:03:55 +0100 Subject: [PATCH 1/4] ci: Add spellchecker and non-inclusive language checker --- .github/workflows/spellcheck.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/spellcheck.yml diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml new file mode 100644 index 00000000..6d987bbe --- /dev/null +++ b/.github/workflows/spellcheck.yml @@ -0,0 +1,31 @@ +name: spellcheck-woke +on: + push: + workflow_dispatch: + +jobs: + + # Check code for non-inclusive language + woke: + name: Run woke + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: woke + uses: get-woke/woke-action@v0 + with: + # Cause the check to fail on any broke rules + fail-on-error: true + + # Enforce en-us spell check + spellcheck: + name: Run spellcheck + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Spellcheck + uses: rojopolis/spellcheck-github-actions@0.27.0 From aa9df813a03b0625a9809f7c4c9164dfed1c250d Mon Sep 17 00:00:00 2001 From: Serdar Dalgic Date: Mon, 14 Nov 2022 13:44:36 +0100 Subject: [PATCH 2/4] ci: Add spellcheck.yaml for the pyspelling configuration For more info on configuration, please visit https://facelessuser.github.io/pyspelling/configuration/ The spellcheck is only applied on the markdown files in the documentation. --- .spellcheck.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .spellcheck.yaml diff --git a/.spellcheck.yaml b/.spellcheck.yaml new file mode 100644 index 00000000..55266e88 --- /dev/null +++ b/.spellcheck.yaml @@ -0,0 +1,27 @@ +matrix: +- name: markdown + sources: + - 'docs/**/*.md' + default_encoding: utf-8 + aspell: + lang: en + d: en_US + dictionary: + wordlists: + - .wordlist-en-custom.txt + pipeline: + - pyspelling.filters.context: + context_visible_first: true + delimiters: + # Ignore multiline content between fences (fences can have 3 or more back ticks) + # ``` + # content + # ``` + - open: '(?s)^(?P *`{3,})' + close: '^(?P=open)$' + # Ignore text between inline back ticks + - open: '(?P`+)' + close: '(?P=open)' + - open: '(?P)' + - pyspelling.filters.url: From b906ef3f10815df2644f22f1df634a95e9cabd50 Mon Sep 17 00:00:00 2001 From: Serdar Dalgic Date: Mon, 14 Nov 2022 13:48:30 +0100 Subject: [PATCH 3/4] ci: Add empty .wordlist-en-custom.txt file, will be filled later. --- .wordlist-en-custom.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .wordlist-en-custom.txt diff --git a/.wordlist-en-custom.txt b/.wordlist-en-custom.txt new file mode 100644 index 00000000..e69de29b From 9d2b7288659f7e5734779bce67b12904e0f1f39f Mon Sep 17 00:00:00 2001 From: Serdar Dalgic Date: Mon, 14 Nov 2022 13:51:27 +0100 Subject: [PATCH 4/4] ci: Generate custom wordlist --- .wordlist-en-custom.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.wordlist-en-custom.txt b/.wordlist-en-custom.txt index e69de29b..9a8d2434 100644 --- a/.wordlist-en-custom.txt +++ b/.wordlist-en-custom.txt @@ -0,0 +1,13 @@ +BigAnimal +CIDR +GUC +IOPS +InstanceType +Postgres +biganimal +config +ip +nestedatt +nestedblock +terraform +uri