Skip to content

Commit dee1467

Browse files
authored
Switch to better typo checker (#906)
Uses the same approach as modeling-app. Finds more typos and scans quicker than codespell.
1 parent e2162a5 commit dee1467

File tree

6 files changed

+22
-19
lines changed

6 files changed

+22
-19
lines changed

.codespellrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -98,18 +98,8 @@ jobs:
9898
steps:
9999
- name: Checkout
100100
uses: actions/checkout@v4
101-
- uses: taiki-e/install-action@just
102-
- name: Install the latest version of uv
103-
uses: astral-sh/setup-uv@v6
104-
- name: Install codespell
105-
run: |
106-
uv venv .venv
107-
echo "VIRTUAL_ENV=.venv" >> $GITHUB_ENV
108-
echo "$PWD/.venv/bin" >> $GITHUB_PATH
109-
uv pip install codespell
110101
- name: Run codespell
111-
# Edit this file to tweak the typo list and other configuration.
112-
run: just check-typos
102+
uses: crate-ci/[email protected]
113103

114104
cargo-toml-sorted:
115105
name: Check Cargo.toml is sorted
@@ -121,3 +111,4 @@ jobs:
121111
run: cargo install cargo-sort
122112
- name: Run check
123113
run: cargo sort --workspace --check
114+

_typos.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[files]
2+
extend-exclude = [
3+
"**/target",
4+
]
5+
6+
7+
[default.extend-words]
8+
metalness = "metalness" # appearance API
9+
typ = "typ" # used to declare a variable named 'type' which is a reserved keyword in Rust
10+
"colinear" = "colinear" # some engine shit, kidding
11+
12+
[default]
13+
extend-ignore-identifiers-re = [
14+
"\\dnd", # e.g. 2nd
15+
]

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ check-wasm:
1010
cargo check -p kittycad-modeling-cmds --target wasm32-unknown-unknown --features websocket
1111

1212
check-typos:
13-
codespell --config .codespellrc
13+
typos
1414

1515
test:
1616
cargo nextest run --all-features

modeling-cmds-macros-impl/benches/my_benchmark.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ fn criterion_benchmark(c: &mut Criterion) {
611611
/// Which face is being queried.
612612
pub object_id: Uuid,
613613

614-
/// The 2D paramter-space u,v position to evaluate the surface at
614+
/// The 2D parameter-space u,v position to evaluate the surface at
615615
pub uv: Point2d<f64>,
616616
}
617617

@@ -628,7 +628,7 @@ fn criterion_benchmark(c: &mut Criterion) {
628628
/// Which face is being queried.
629629
pub object_id: Uuid,
630630

631-
/// The 2D paramter-space u,v position to evaluate the surface at
631+
/// The 2D parameter-space u,v position to evaluate the surface at
632632
pub uv: Point2d<f64>,
633633
}
634634

modeling-cmds/src/def_enum.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ define_modeling_cmd_enum! {
921921
/// Which face is being queried.
922922
pub object_id: Uuid,
923923

924-
/// The 2D paramter-space u,v position to evaluate the surface at
924+
/// The 2D parameter-space u,v position to evaluate the surface at
925925
pub uv: Point2d<f64>,
926926
}
927927

@@ -942,7 +942,7 @@ define_modeling_cmd_enum! {
942942
/// Which face is being queried.
943943
pub object_id: Uuid,
944944

945-
/// The 2D paramter-space u,v position to evaluate the surface at
945+
/// The 2D parameter-space u,v position to evaluate the surface at
946946
pub uv: Point2d<f64>,
947947
}
948948

0 commit comments

Comments
 (0)