Skip to content

Commit db84566

Browse files
committed
chore: add typo check to linter
1 parent 19283f0 commit db84566

File tree

4 files changed

+22
-3
lines changed

4 files changed

+22
-3
lines changed

.github/workflows/typos.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[default]
2+
extend-ignore-re = ["(#|//)\\s*spellchecker:ignore-next-line\\n.*"]
3+
4+
[default.extend-words]
5+
trialer = "trialer"
6+
7+
[files]
8+
extend-exclude = [
9+
"go.sum",
10+
"go.mod",
11+
# Fixtures contain truncated streaming chunks that look like typos
12+
"fixtures/**",
13+
# Test files contain hashes and redacted values that look like typos
14+
"**/*_test.go",
15+
]

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,18 @@ SHELL_SRC_FILES := $(shell find . -type f -name '*.sh' -not -path '*/.git/*')
1717
GOLANGCI_LINT_VERSION ?= 1.64.8
1818
PARALLELTESTCTX_VERSION ?= 0.0.1
1919

20-
lint: lint/shellcheck lint/go
20+
lint: lint/shellcheck lint/go lint/typos
2121
.PHONY: lint
2222

2323
lint/go:
2424
go run github.com/golangci/golangci-lint/cmd/golangci-lint@v$(GOLANGCI_LINT_VERSION) run
2525
go run github.com/coder/paralleltestctx/cmd/paralleltestctx@v$(PARALLELTESTCTX_VERSION) -custom-funcs="testutil.Context" ./...
2626
.PHONY: lint/go
2727

28+
lint/typos:
29+
typos . --config .github/workflows/typos.toml
30+
.PHONY: lint/typos
31+
2832
lint/shellcheck:
2933
if test -n "$(strip $(SHELL_SRC_FILES))"; then \
3034
echo "--- shellcheck"; \

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ See [example/](example/) for a complete runnable example with SQLite persistence
118118
5. **Test with Claude Code**:
119119
Claude Code allows a base URL override via `ANTHROPIC_BASE_URL`.
120120

121-
![image with cloude code example](example/claude-code.png)
121+
![image with claude code example](example/claude-code.png)
122122

123123
## Supported Routes
124124

intercept/apidump/apidump.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func (d *dumper) dumpResponse(resp *http.Response) error {
153153
// writeRedactedHeaders writes HTTP headers in wire format (Key: Value\r\n) to w,
154154
// redacting sensitive values and applying any overrides. Headers are sorted by key
155155
// for deterministic output.
156-
// `sensitive` and `overrides` must both supply keys in canoncialized form.
156+
// `sensitive` and `overrides` must both supply keys in canonicalized form.
157157
// See [textproto.MIMEHeader].
158158
func (*dumper) writeRedactedHeaders(w io.Writer, headers http.Header, sensitive map[string]struct{}, overrides map[string]string) error {
159159
// Collect all header keys including overrides.

0 commit comments

Comments
 (0)