mirror of
https://github.com/Blah-IM/blahrs.git
synced 2025-04-30 16:21:10 +00:00
ci,contrib: add typos and pre-commit script
This commit is contained in:
parent
ba9673065a
commit
1c9108610d
4 changed files with 9 additions and 1 deletions
3
.github/workflows/ci.yaml
vendored
3
.github/workflows/ci.yaml
vendored
|
@ -37,6 +37,9 @@ jobs:
|
|||
- name: Rustdoc
|
||||
run: cargo doc --workspace --no-deps
|
||||
|
||||
- name: Typos
|
||||
uses: crate-ci/typos@v1.26.0
|
||||
|
||||
test:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
|
0
.typos.toml
Normal file
0
.typos.toml
Normal file
|
@ -38,7 +38,7 @@ impl IdExt for Id {
|
|||
last_id.set(id);
|
||||
Id(id)
|
||||
} else {
|
||||
// Otherwise, try to increse the trailing counter.
|
||||
// Otherwise, try to increase the trailing counter.
|
||||
assert!(prev < (1 << 16), "id counter overflow");
|
||||
last_id.set(prev + 1);
|
||||
Id(prev + 1)
|
||||
|
|
5
contrib/pre-commit
Executable file
5
contrib/pre-commit
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
typos
|
||||
cargo fmt -- --check
|
||||
fd -e nix | xargs nixfmt --check
|
Loading…
Add table
Reference in a new issue