Skip to content

Commit cee1d81

Browse files
authored
CI: add lock and typos check (#522)
Ensures `Cargo.lock` is up-to-date, and checks for typos
1 parent 96788a2 commit cee1d81

3 files changed

Lines changed: 36 additions & 2 deletions

File tree

.github/workflows/workspace.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ env:
1414
RUSTFLAGS: "-Dwarnings"
1515
RUSTDOCFLAGS: "-Dwarnings"
1616

17+
# Cancels CI jobs when new commits are pushed to a PR branch
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
20+
cancel-in-progress: true
21+
1722
jobs:
1823
clippy:
1924
runs-on: ubuntu-latest
@@ -35,6 +40,13 @@ jobs:
3540
toolchain: stable
3641
- run: cargo doc --workspace --all-features --no-deps
3742

43+
lock:
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v6
47+
- uses: dtolnay/rust-toolchain@stable
48+
- run: cargo check --workspace --locked
49+
3850
rustfmt:
3951
runs-on: ubuntu-latest
4052
steps:
@@ -44,3 +56,9 @@ jobs:
4456
toolchain: stable
4557
components: rustfmt
4658
- run: cargo fmt --all -- --check
59+
60+
typos:
61+
runs-on: ubuntu-latest
62+
steps:
63+
- uses: actions/checkout@v6
64+
- uses: crate-ci/typos@v1.46.0

.typos.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[files]
2+
extend-exclude = [
3+
".git/",
4+
]
5+
6+
[default]
7+
extend-ignore-re = [
8+
# Patterns which appear to be 36 or more characters of Base64/Base64url
9+
'\b[0-9A-Za-z+/]{36,}\b',
10+
'\b[0-9A-Za-z_-]{36,}\b',
11+
]
12+
13+
[default.extend-words]
14+
consts = "consts"
15+
"Ede" = "Ede" # Encrypt-Decrypt-Encrypt
16+
"nameß" = "nameß" # Invalid name example

ssh-encoding/src/encode.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,9 @@ impl_by_delegation!(
242242
impl Encode for Bytes where self -> self.as_ref();
243243

244244
// While deref coercion ensures that `&E` can use the `Encode` trait methods, it will not be
245-
// allowd in trait bounds, as `&E` does not implement `Encode` itself just because `E: Encode`.
245+
// allowed in trait bounds, as `&E` does not implement `Encode` itself just because `E: Encode`.
246246
// A blanket impl for `&E` would be the most generic, but that collides with the `Label` trait's
247-
// blanket impl. Instead, we can do it explicitly for the immediatley relevant base types.
247+
// blanket impl. Instead, we can do it explicitly for the immediately relevant base types.
248248
impl Encode for &str where self -> **self;
249249
impl Encode for &[u8] where self -> **self;
250250
#[cfg(feature = "alloc")]

0 commit comments

Comments
 (0)