Skip to content

Commit a064a6c

Browse files
committed
ci: add typos detection in GitHub actions
1 parent 67c359f commit a064a6c

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-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/typos@v1.31.1

typos.toml

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

0 commit comments

Comments
 (0)