From 5c0c288f63659b987a442678b1ace593ee0946aa Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 21 Aug 2022 21:29:45 -0400 Subject: [PATCH] Use check-spelling/check-spelling@v0.0.20 Refreshes the workflow based on https://github.com/check-spelling/spell-check-this/blob/744c66e2140fd8acaf5388efd0db3727d010d6e9/.github/workflows/spelling.yml --- .github/actions/spelling/allow.txt | 38 ++++++++++++++++++++++ .github/actions/spelling/expect.txt | 37 +--------------------- .github/actions/spelling/patterns.txt | 2 +- .github/workflows/spelling.yml | 45 +++++++++++++++++++-------- 4 files changed, 72 insertions(+), 50 deletions(-) create mode 100644 .github/actions/spelling/allow.txt diff --git a/.github/actions/spelling/allow.txt b/.github/actions/spelling/allow.txt new file mode 100644 index 00000000..4c8ae114 --- /dev/null +++ b/.github/actions/spelling/allow.txt @@ -0,0 +1,38 @@ +abspath +abstractmethod +agg +api +appendable +argparse +args +argv +ASer +atexit +autoapi +autocoded +autocode +Autocoders +autocoders +autocoding +autodoc +autoescape +autosectionlabel +backport +baremetal +buf +bytearray +calcsize +changelog +chdir +classmethod +lestarch +LGTM +lgtm +Linux +Prm +prm +Serializables +serializables +timezone +Tlm +tlm diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index 89d7a983..ef505af0 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -1,34 +1,7 @@ -abspath -abstractmethod -agg -api -appendable -argparse -args -argv -ASer -atexit -autoapi -autocoded -autocode -Autocoders -autocoders -autocoding -autodoc -autoescape -autosectionlabel -backport -baremetal -buf -bytearray -calcsize cargs cexc cfg -changelog -chdir ci -classmethod cls cmake cmakelists @@ -134,10 +107,6 @@ jsonable kevin kwargs len -lestarch -LGTM -lgtm -Linux lld locs lstrip @@ -164,7 +133,7 @@ pathlib Peet pexpect Popen -Prm + proj ptf py @@ -202,8 +171,6 @@ Sched SCLK scm sdd -Serializables -serializables setuptools shutil someotherpath @@ -231,8 +198,6 @@ testbuild testimpl textwrap timebase -timezone -Tlm toctree todo toolchain diff --git a/.github/actions/spelling/patterns.txt b/.github/actions/spelling/patterns.txt index 7c863853..0b5ce7c8 100644 --- a/.github/actions/spelling/patterns.txt +++ b/.github/actions/spelling/patterns.txt @@ -36,7 +36,7 @@ value="(?:[0-9a-f]{1,2} )*" \b([A-Za-z])\g{-1}{3,}\b #Ignore -Dflags --D[A_Z_]* +-D[A-Za-z_]* # Ignore string sequence if it is assigned to a variable and has special symbols | \ / % * & % =\s*["'].*[\|\\\/\#\*\&\%].*["'] diff --git a/.github/workflows/spelling.yml b/.github/workflows/spelling.yml index 74e0d9c9..940bbdf4 100644 --- a/.github/workflows/spelling.yml +++ b/.github/workflows/spelling.yml @@ -13,21 +13,40 @@ on: types: ['opened', 'reopened', 'synchronize'] jobs: - build: + spelling: name: Spell checking + permissions: + contents: read + pull-requests: read + actions: read + outputs: + followup: ${{ steps.spelling.outputs.followup }} runs-on: ubuntu-20.04 + if: "contains(github.event_name, 'pull_request') || github.event_name == 'push'" + concurrency: + group: spelling-${{ github.event.pull_request.number || github.ref }} + # note: If you use only_check_changed_files, you do not want cancel-in-progress + cancel-in-progress: true steps: - - name: checkout-merge - if: "contains(github.event_name, 'pull_request')" - uses: actions/checkout@v2.0.0 + - name: check-spelling + id: spelling + uses: check-spelling/check-spelling@v0.0.20 with: - ref: refs/pull/${{github.event.pull_request.number}}/merge - fetch-depth: 5 - - name: checkout - if: "!contains(github.event_name, 'pull_request')" - uses: actions/checkout@v2.0.0 - with: - fetch-depth: 5 - - uses: check-spelling/check-spelling@v0.0.19 + suppress_push_for_open_pull_request: 1 + checkout: true + post_comment: 0 + + comment: + name: Report + runs-on: ubuntu-latest + needs: spelling + permissions: + contents: write + pull-requests: write + if: (success() || failure()) && needs.spelling.outputs.followup + steps: + - name: comment + uses: check-spelling/check-spelling@v0.0.20 with: - shortest_word: 2 + checkout: true + task: ${{ needs.spelling.outputs.followup }}