Skip to content

Commit bc8afe1

Browse files
committed
chore: add typos spell checker configuration
- Add typos.toml configuration file - Add typos CI job to workflow - Add typos and typos-lsp to flake.nix devShell - Enable typos in treefmt - Add just typos command
1 parent e0a67c2 commit bc8afe1

File tree

4 files changed

+34
-0
lines changed

4 files changed

+34
-0
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,18 @@ permissions:
1414
contents: read
1515

1616
jobs:
17+
typos:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
22+
23+
- name: Setup Nix
24+
uses: ./.github/actions/setup-nix
25+
26+
- name: Run Typo Check
27+
run: nix develop --command typos .
28+
1729
ci:
1830
runs-on: ubuntu-latest
1931
strategy:

flake.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"CHANGELOG.md"
5555
];
5656
};
57+
typos.enable = true;
5758
};
5859
};
5960

@@ -81,6 +82,8 @@
8182
uv
8283
just
8384
nixfmt-rfc-style
85+
typos
86+
typos-lsp
8487
];
8588

8689
shellHook = ''

justfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,7 @@ test-examples:
2525
# Run type checking
2626
mypy:
2727
uv run mypy stackone_ai
28+
29+
# Run typos spell checker
30+
typos:
31+
typos .

typos.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[default]
2+
locale = 'en-us'
3+
extend-ignore-re = [
4+
"(?s)(#|//)\\s*spellchecker:off.*?\\n\\s*(#|//)\\s*spellchecker:on",
5+
"(?s)<!--\\s*spellchecker:off.*?\\n\\s*spellchecker:on\\s*-->",
6+
"(?Rm)^.*#\\s*spellchecker:disable-line$",
7+
"(?m)^.*<!--\\s*spellchecker:disable-line\\s*-->\\n.*$"
8+
]
9+
10+
[files]
11+
extend-exclude = [
12+
".venv",
13+
"uv.lock",
14+
"CHANGELOG.md",
15+
]

0 commit comments

Comments
 (0)