Skip to content

Commit

Permalink
Using spell check action
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Golding committed Jul 11, 2022
0 parents commit e8928d6
Show file tree
Hide file tree
Showing 7 changed files with 136 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/actions/spelling/advice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!-- See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-advice --> <!-- markdownlint-disable MD033 MD041 -->
<details><summary>If you see a bunch of garbage</summary>

and...
<details><summary>it relates to a well-formed pattern</summary>
See if there's a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it.

If not, try writing one and adding it to the `patterns.txt` file.

Patterns are Perl 5 Regular Expressions - you can [test](
https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines.

Note that patterns can't match multiline strings.
</details>
<details><summary>it relates to a binary-ish string</summary>

Please add a file path to the `excludes.txt` file instead of just accepting the garbage.

File paths are Perl 5 Regular Expressions - you can [test](
https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files.

`^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md](
../tree/HEAD/README.md) (on whichever branch you're using).
</details>

</details>
1 change: 1 addition & 0 deletions .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uniq
55 changes: 55 additions & 0 deletions .github/actions/spelling/excludes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
(?:^|/)Dockerfile$
(?:^|/)go\.mod$
(?:^|/)go\.sum$
(?:^|/)package(?:-lock|)\.json$
/OWNERS$
ignore$
SUMS$
\.ai$
\.bmp$
\.cer$
\.class$
\.crl$
\.crt$
\.csr$
\.dhall$
\.dll$
\.DS_Store$
\.eot$
\.eps$
\.exe$
\.gif$
\.graffle$
\.gz$
\.icns$
\.ico$
\.jar$
\.jpeg$
\.jpg$
\.keep$
\.key$
\.lib$
\.lock$
\.map$
\.min\..
\.mp3$
\.mp4$
\.otf$
\.pdf$
\.pem$
\.png$
\.psd$
\.sig$
\.so$
\.svg$
\.svgz$
\.tar$
\.tgz$
\.ttf$
\.woff
\.xcf$
\.xls
\.xpm$
\.yml$
\.zip$
^\.github/actions/spelling/
9 changes: 9 additions & 0 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
args
GITHUB
json
mktemp
NONINFRINGEMENT
regexp
setpath
Workflow
xargs
4 changes: 4 additions & 0 deletions .github/actions/spelling/patterns.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns

# ignore long runs of a single character:
\b([A-Za-z])\1{3,}\b
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
timezone: America/Toronto
open-pull-requests-limit: 10
28 changes: 28 additions & 0 deletions .github/workflows/spelling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Spell checking

on:
pull_request_target:
push:
branches:
- "**"
tags-ignore:
- "**"
issue_comment:

jobs:
spelling:
name: Spell checking
runs-on: ubuntu-latest
steps:
- name: checkout-merge
if: "contains(github.event_name, 'pull_request')"
uses: actions/checkout@v3
with:
ref: refs/pull/${{github.event.pull_request.number}}/merge
- name: checkout
if: "!contains(github.event_name, 'pull_request')"
uses: actions/checkout@v3
- uses: check-spelling/check-spelling@prerelease
with:
experimental_apply_changes_via_bot: 1
suppress_push_for_open_pull_request: 1

0 comments on commit e8928d6

Please sign in to comment.