Skip to content

Commit

Permalink
Use check-spelling/check-spelling@v0.0.20 (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoref authored Aug 22, 2022
1 parent 2ba8103 commit 01953bd
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 50 deletions.
38 changes: 38 additions & 0 deletions .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
@@ -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
37 changes: 1 addition & 36 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -134,10 +107,6 @@ jsonable
kevin
kwargs
len
lestarch
LGTM
lgtm
Linux
lld
locs
lstrip
Expand All @@ -164,7 +133,7 @@ pathlib
Peet
pexpect
Popen
Prm

proj
ptf
py
Expand Down Expand Up @@ -202,8 +171,6 @@ Sched
SCLK
scm
sdd
Serializables
serializables
setuptools
shutil
someotherpath
Expand Down Expand Up @@ -231,8 +198,6 @@ testbuild
testimpl
textwrap
timebase
timezone
Tlm
toctree
todo
toolchain
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/spelling/patterns.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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*["'].*[\|\\\/\#\*\&\%].*["']
Expand Down
45 changes: 32 additions & 13 deletions .github/workflows/spelling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit 01953bd

Please sign in to comment.