Skip to content
Draft
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
13 changes: 13 additions & 0 deletions .github/actions/spelling/advice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
### Spell check advice for contributors

If the spell checker flags a word that is correctly spelled:

1. **Project-specific term** (API type name, product name): Add it to `.github/actions/spelling/allow.txt`
2. **Technical jargon** that may come and go: Add it to `.github/actions/spelling/expect.txt`
3. **A pattern** (URLs, code, encoded data): Add a regex to `.github/actions/spelling/patterns.txt`

If the spell checker flags a word in a **generated file** under `docs/reference/`:
- Fix the typo in the Go source code comment, then regenerate with `make docs`
- Do NOT add the misspelling to `allow.txt` or `expect.txt`

To re-run the spell check after updating configuration files, comment `@check-spelling-bot apply` on the PR.
19 changes: 19 additions & 0 deletions .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
CLF
CLO
COO
CloudWatch
ClusterLogForwarder
ClusterLogging
Fluentd
HEC
LokiStack
OTLP
OpenShift
VIAQ
adoc
cloudwatch
fluentd
lokistack
otlp
podman
viaq
12 changes: 12 additions & 0 deletions .github/actions/spelling/excludes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Spelling config directory
\.github/actions/spelling/

# Vendored and generated dependencies
vendor/
\.bingo/

# Binary and image files
\.png$
\.jpg$
\.svg$
\.ico$
4 changes: 4 additions & 0 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Carry forward from .codespellignore
coo
fileds
notin
3 changes: 3 additions & 0 deletions .github/actions/spelling/only.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\.adoc$
\.md$
\.txt$
43 changes: 43 additions & 0 deletions .github/actions/spelling/patterns.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# URLs
https?://\S+

# Email addresses
\S+@\S+\.\S+

# Git SHA references
\b[0-9a-f]{7,40}\b

# HTML entities in generated docs
&#\d+;

# Base64 encoded strings
\b[A-Za-z0-9+/]{20,}={0,2}\b

# Hex values
\b0x[0-9a-fA-F]+\b

# Version strings
v\d+\.\d+(\.\d+)?

# AsciiDoc directives and macros
^include::.*$
^ifdef::.*$
^ifndef::.*$
^endif::.*$
^:[\w-]+:.*$
image::[^\[]*\[
link:[^\[]*\[
xref:[^\[]*\[

# AsciiDoc anchors and cross-references
\[id="[^"]*"\]
<<[^>]+>>

# Inline code in backticks
`[^`]+`

# AWS ARN patterns
arn:aws:\S+

# YAML/JSON field paths
\{\.[\w.]+\}
5 changes: 5 additions & 0 deletions .github/actions/spelling/reject.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Known typos found in this repository
implimentation
obervability
potentionally
similiar
54 changes: 54 additions & 0 deletions .github/workflows/spelling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Spell checking

on:
pull_request_target:
branches:
- "**"
types:
- opened
- reopened
- synchronize
issue_comment:
types:
- created

permissions:
contents: read
pull-requests: read

jobs:
spelling:
name: Spell checking
permissions:
contents: read
pull-requests: read
checks: write
comments: write
runs-on: ubuntu-latest
if: >-
(github.event_name == 'pull_request_target') ||
(github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
contains(github.event.comment.body, '@check-spelling-bot'))
concurrency:
group: spelling-${{ github.event.pull_request.number || github.event.issue.number }}
cancel-in-progress: true
steps:
- name: check-spelling
id: spelling
uses: check-spelling/check-spelling@v0.0.22
with:
config: .github/actions/spelling
check_file_names: 1
only_check_changed_files: 1
post_comment: 1
use_sarif: 0
extra_dictionaries: |
cspell:k8s/dict/k8s.txt
cspell:golang/dict/go.txt
cspell:docker/src/docker-words.txt
cspell:shell/dict/shell-all-words.txt
cspell:html/dict/html.txt
cspell:filetypes/dict/filetypes.txt
cspell:software-terms/dict/softwareTerms.txt
check_extra_dictionaries: ""