Skip to content

Commit e856d05

Browse files
committed
ci: add typos detection in GitHub actions
1 parent fd73826 commit e856d05

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.github/workflows/typos.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Typos Check
2+
on:
3+
push:
4+
pull_request:
5+
jobs:
6+
typos:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout Code
10+
uses: actions/checkout@v4
11+
- name: typos-action
12+
uses: crate-ci/[email protected]

typos.toml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[default]
2+
locale = "en-us"
3+
extend-ignore-re=[
4+
# UID and equivalent
5+
"[A-Za-z0-9=_-]{30,}",
6+
# CONTRIBUTING.md mentions it as an example for the expected American English
7+
"favor.*instead of.*favour",
8+
]
9+
10+
[default.extend-words]
11+
datas = "datas" # common error on plural
12+
ba = "ba" # short variable name
13+
mosquitto = "mosquitto" # this is a MQQT broker
14+
IIT = "IIT" # Indian Institute of Technology
15+
typ = "typ" # short variable name
16+
17+
[files]
18+
# excluded file
19+
extend-exclude = [
20+
"go.sum","go.mod", # go.sum and go.mod contains URLs with hash, they can provide false positive
21+
"vendor", # not my dragon
22+
"pkg/gofr/static/swagger*",
23+
]

0 commit comments

Comments
 (0)