diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 79fc26c..8ae8391 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,9 @@ jobs: - uses: taiki-e/install-action@just - uses: taiki-e/install-action@dprint + - uses: taiki-e/install-action@v2 + with: + tool: typos-cli - name: Check MSRV run: | diff --git a/README.md b/README.md index b8a7a65..cbcaed2 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ When you use this template, try to follow the checklist to update your info prop - [ ] Change the author name in `LICENSE` - [ ] Change the package info in `Cargo.toml` - [ ] Change the application name: - - [ ] Database name and other values in `.env`, `.example.env`, and other containr related files. + - [ ] Database name and other values in `.env`, `.example.env`, and other container related files. - [ ] The OpenAPI info in `routes.rs` - [ ] App name in `release.yml` - [ ] Project URL in `cliff.toml` diff --git a/configs/typos.toml b/configs/typos.toml new file mode 100644 index 0000000..3d67aec --- /dev/null +++ b/configs/typos.toml @@ -0,0 +1,6 @@ +[files] +extend-exclude = ["CHANGELOG.md"] + +[default.extend-words] +# [RFC 4122 - A Universally Unique IDentifier (UUID) URN Namespace](https://datatracker.ietf.org/doc/html/rfc4122) +Dentifier = "Dentifier" diff --git a/justfile b/justfile index 8f54231..f225581 100755 --- a/justfile +++ b/justfile @@ -14,7 +14,7 @@ _default: # Setup the repository. setup: _areyousure - just _cargo-install 'cargo-edit cargo-nextest cargo-outdated dprint git-cliff bacon' + just _cargo-install 'cargo-edit cargo-nextest cargo-outdated dprint git-cliff bacon typos-cli' just _cargo-install 'sqlx-cli' # Tasks to make the code-base comply with the rules. Mostly used in git hooks. @@ -61,6 +61,7 @@ fmt-check: # Lint the codebase. lint: cargo clippy --all-targets --all-features + typos --config configs/typos.toml # Test the codebase. test: diff --git a/src/domain/health/resolver.rs b/src/domain/health/resolver.rs index 09a4215..b9b0a48 100644 --- a/src/domain/health/resolver.rs +++ b/src/domain/health/resolver.rs @@ -23,7 +23,7 @@ impl HealthQuery { } } -/// Test server health wihout invoking many +/// Test server health without invoking many /// moving parts. #[utoipa::path( get, diff --git a/src/error/app.rs b/src/error/app.rs index a62ebc6..fcd89ec 100755 --- a/src/error/app.rs +++ b/src/error/app.rs @@ -29,7 +29,7 @@ impl std::convert::From for crate::Error { impl std::convert::From for Error { fn from(err: sqlx::Error) -> Self { match err { - // Not found error should be catched manually + // Not found error should be caught manually _ => Error::Internal, } } diff --git a/src/relay/validation.rs b/src/relay/validation.rs index f7be93d..d0fed6b 100644 --- a/src/relay/validation.rs +++ b/src/relay/validation.rs @@ -10,7 +10,7 @@ use crate::{ relay::Base64Cursor, }; -/// Parse `after` and `befor` to cursor +/// Parse `after` and `before` to cursor pub fn convert_params( after: Option, before: Option, diff --git a/tests/user/schema.rs b/tests/user/schema.rs index e96c062..1f5506e 100644 --- a/tests/user/schema.rs +++ b/tests/user/schema.rs @@ -70,7 +70,7 @@ pub struct DeleteUserResponse { #[derive(Debug, Deserialize)] #[serde(rename_all(deserialize = "camelCase"))] pub struct DeleteUserWrapper { - pub delte_user: User, + pub delete_user: User, } //