Skip to content

Commit 9d6b641

Browse files
ci: Add typos check (#697)
1 parent e513e99 commit 9d6b641

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

.github/workflows/rust.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,20 @@ jobs:
4646
run: cargo build --verbose
4747
- name: Run tests
4848
run: cargo test --verbose
49+
typos:
50+
# If this fails, consider changing your text or adding something to .typos.toml
51+
runs-on: ubuntu-latest
52+
steps:
53+
- uses: actions/checkout@v4
54+
- name: check typos
55+
uses: crate-ci/typos@v1.23.6
4956
build_result:
5057
name: Result
5158
runs-on: ubuntu-latest
5259
needs:
5360
- "build"
5461
- "semver"
62+
- "typos"
5563
steps:
5664
- name: Mark the job as successful
5765
run: exit 0

.typos.toml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# See the configuration reference at
2+
# https://github.com/crate-ci/typos/blob/master/docs/reference.md
3+
4+
# Corrections take the form of a key/value pair. The key is the incorrect word
5+
# and the value is the correct word. If the key and value are the same, the
6+
# word is treated as always correct. If the value is an empty string, the word
7+
# is treated as always incorrect.
8+
9+
# Match Identifier - Case Sensitive
10+
[default.extend-identifiers]
11+
setShowsApplicatinBadge_ = "setShowsApplicatinBadge_"
12+
showsApplicatinBadge = "showsApplicatinBadge"
13+
14+
# Match Inside a Word - Case Insensitive
15+
[default.extend-words]
16+
17+
[files]
18+
# Include .github, .cargo, etc.
19+
ignore-hidden = false
20+
# /.git isn't in .gitignore, because git never tracks it.
21+
# Typos doesn't know that, though.
22+
extend-exclude = ["/.git"]
23+

0 commit comments

Comments
 (0)