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

Set up spell checking in PRs #1227

Merged
merged 4 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
65 changes: 65 additions & 0 deletions .github/workflows/cspell.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: 'Check spelling'
on:
# Don't enable in PRs just yet until we've built a sane wordlist
# pull_request: {}
# push:
# branches: [ main ]
workflow_dispatch: {}

jobs:
spellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: streetsidesoftware/cspell-action@v6
with:
# Define glob patterns to filter the files to be checked. Use a new line between patterns to define multiple patterns.
# The default is to check ALL files that were changed in in the pull_request or push.
# Note: `ignorePaths` defined in cspell.json still apply.
# Example:
# files: |
# **/*.{ts,js}
# !dist/**/*.{ts,js}
#
# Default: ALL files
files: ''

# Check files and directories starting with `.`.
# - "true" - glob searches will match against `.dot` files.
# - "false" - `.dot` files will NOT be checked.
# - "explicit" - glob patterns can match explicit `.dot` patterns.
check_dot_files: explicit

# The point in the directory tree to start spell checking.
# Default: .
root: '.'

# Notification level to use with inline reporting of spelling errors.
# Allowed values are: warning, error, none
# Default: warning
inline: warning

# Reports flagged / forbidden words as errors.
# If true, errors will still be reported even if `inline` is "none"
treat_flagged_words_as_errors: false

# Generate Spelling suggestions.
suggestions: false

# Determines if the action should be failed if any spelling issues are found.
# Allowed values are: true, false
# Default: true
strict: false

# Limit the files checked to the ones in the pull request or push.
incremental_files_only: ${{ github.event_name != 'workflow_dispatch' }}

# Path to `cspell.json`
config: 'cspell.json'

# Log progress and other information during the action execution.
# Default: false
verbose: false

# Use the `files` setting found in the CSpell configuration instead of `input.files`.
use_cspell_files: false
15 changes: 15 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": "0.2",
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
"enableGlobDot": true,
"words": [],
"useGitignore": true,
"ignorePaths": [
".git/*",
".git/!{COMMIT_EDITMSG,EDITMSG}",
".git/*/**",
"cspell.json",
],
"overrides": [],
"enableFiletypes": []
}