Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update check-spelling configuration #616

Merged
merged 4 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
a2enmod

Check warning on line 1 in .github/actions/spelling/allow.txt

View workflow job for this annotation

GitHub Actions / Check Spelling

Ignoring entry because it contains non-alpha characters. (non-alpha-in-dictionary)
aai
aaiproxy
aarc
Expand Down Expand Up @@ -613,7 +613,6 @@
universiti
untaring
uploadtest
uploadtest.txt
UPM
upv
uscms
Expand Down
3 changes: 0 additions & 3 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Expected "words" that aren't in the dictionary, one word per line.
# Some arbitrary strings that are in test files that aren't really words.
# They should be removed if the test are changed/removed.
CVMFS
diracsgm
microk8s

Check warning on line 3 in .github/actions/spelling/expect.txt

View workflow job for this annotation

GitHub Actions / Check Spelling

Ignoring entry because it contains non-alpha characters. (non-alpha-in-dictionary)
mytoken
reponame
sgm
91 changes: 50 additions & 41 deletions .github/workflows/spelling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,29 @@ name: Check Spelling
#
# For background, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-with-deploy-key

# Sarif reporting
#
# Access to Sarif reports is generally restricted (by GitHub) to members of the repository.
#
# Requires enabling `security-events: write`
# and configuring the action with `use_sarif: 1`
#
# For information on the feature, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Sarif-output

# Minimal workflow structure:
#
# on:
# push:
# ...
# pull_request_target:
# ...
# jobs:
# # you only want the spelling job, all others should be omitted
# spelling:
# # remove `security-events: write` and `use_sarif: 1`
# # remove `experimental_apply_changes_via_bot: 1`
# ... otherwise adjust the `with:` as you wish

on:
push:
branches:
Expand All @@ -44,12 +67,12 @@ on:
branches:
- "**"
types:
- 'opened'
- 'reopened'
- 'synchronize'
- "opened"
- "reopened"
- "synchronize"
issue_comment:
types:
- 'created'
- "created"

jobs:
spelling:
Expand All @@ -62,7 +85,9 @@ jobs:
outputs:
followup: ${{ steps.spelling.outputs.followup }}
runs-on: ubuntu-latest
if: "contains(github.event_name, 'pull_request') || github.event_name == 'push'"
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
Expand All @@ -72,41 +97,21 @@ jobs:
id: spelling
uses: check-spelling/check-spelling@main
with:
suppress_push_for_open_pull_request: 1
suppress_push_for_open_pull_request:
${{ github.actor != 'dependabot[bot]' && 1 }}
checkout: true
only_check_changed_files: 1
check_file_names: 1
spell_check_this: check-spelling/spell-check-this@prerelease
post_comment: 0
use_magic_file: 1
experimental_apply_changes_via_bot: 1
use_sarif: 0
extra_dictionary_limit: 10
extra_dictionaries:
cspell:aws/aws.txt
cspell:bash/bash-words.txt
cspell:cpp/src/cpp.txt
cspell:django/django.txt
cspell:elixir/elixir.txt
cspell:filetypes/filetypes.txt
cspell:fullstack/fullstack.txt
cspell:html/html.txt
cspell:java/java.txt
cspell:node/node.txt
cspell:npm/npm.txt
cspell:php/php.txt
cspell:powershell/powershell.txt
cspell:public-licenses/src/generated/public-licenses.txt
cspell:python/src/common/extra.txt
cspell:python/src/python/python-lib.txt
cspell:python/src/python/python.txt
cspell:r/src/r.txt
cspell:rust/rust.txt
cspell:scala/scala.txt
cspell:software-terms/src/software-terms.txt
cspell:sql/src/tsql.txt
cspell:typescript/typescript.txt
cspell:win32/src/win32.txt
use_sarif:
${{ (!github.event.pull_request ||
(github.event.pull_request.head.repo.full_name ==
github.repository)) && 1 }}
extra_dictionary_limit: 20
extra_dictionaries: cspell:software-terms/dict/softwareTerms.txt

comment-push:
name: Report (Push)
Expand All @@ -115,10 +120,12 @@ jobs:
needs: spelling
permissions:
contents: write
if: (success() || failure()) && needs.spelling.outputs.followup && github.event_name == 'push'
if:
(success() || failure()) && needs.spelling.outputs.followup &&
github.event_name == 'push'
steps:
- name: comment
uses: check-spelling/check-spelling@prerelease
uses: check-spelling/check-spelling@main
with:
checkout: true
spell_check_this: check-spelling/spell-check-this@prerelease
Expand All @@ -130,8 +137,11 @@ jobs:
runs-on: ubuntu-latest
needs: spelling
permissions:
contents: read
pull-requests: write
if: (success() || failure()) && needs.spelling.outputs.followup && contains(github.event_name, 'pull_request')
if:
(success() || failure()) && needs.spelling.outputs.followup &&
contains(github.event_name, 'pull_request')
steps:
- name: comment
uses: check-spelling/check-spelling@main
Expand All @@ -148,11 +158,10 @@ jobs:
pull-requests: write
actions: read
runs-on: ubuntu-latest
if: ${{
github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
contains(github.event.comment.body, '@check-spelling-bot apply')
}}
if:
${{ github.event_name == 'issue_comment' &&
github.event.issue.pull_request && contains(github.event.comment.body,
'@check-spelling-bot apply') }}
concurrency:
group: spelling-update-${{ github.event.issue.number }}
cancel-in-progress: false
Expand Down
Loading