Skip to content

Commit 44af0b5

Browse files
committed
update pre-push githook, deny unknown lints
1 parent 3867c9c commit 44af0b5

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

.githooks/pre-push

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
set -e
44

5+
echo "+ git status --porcelain"
56
git_status="$(git status --porcelain)"
6-
if test -n "$git_status"; then
7+
if [ "$git_status" != "" ]; then
78
echo "$git_status"
89
echo "pre-push hook failed: working directory is dirty"
910
exit 1
@@ -16,7 +17,7 @@ if rg "FIXME" --hidden --glob="!$0" "$PWD"; then
1617
echo "pre-push hook failed: FIXME not allowed"
1718
exit 1
1819
fi
19-
cargo udeps --all-targets --all-features
20+
cargo +nightly udeps --all-targets --all-features
2021
export RUSTFLAGS="-D warnings"
2122
cargo clippy --all-targets --all-features
2223
cargo test --all-features

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99

1010
env:
1111
RUSTFLAGS: "-D warnings"
12+
RUSTUP_TOOLCHAIN: "1.89"
1213

1314
jobs:
1415
check:
@@ -24,7 +25,7 @@ jobs:
2425
- name: install
2526
uses: dtolnay/rust-toolchain@stable
2627
with:
27-
toolchain: stable
28+
toolchain: 1.89
2829
components: clippy
2930
- name: clippy
3031
run: cargo clippy --all-targets --all-features

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ rand_xorshift = "0.4.*"
2020
[features]
2121
derive_serdes = ["serde", "smallvec/serde"]
2222

23+
[lints.rust]
24+
unknown-lints = "deny"
25+
2326
[lints.clippy]
2427
allow-attributes = "warn"
2528
assertions-on-result-states = "warn"
@@ -34,7 +37,7 @@ cloned-instead-of-copied = "warn"
3437
collection-is-never-read = "warn"
3538
debug-assert-with-mut-call = "warn"
3639
derive-partial-eq-without-eq = "warn"
37-
doc-broken-link = "warn"
40+
#doc-broken-link = "warn" # lint not available in rust 1.89
3841
doc-include-without-cfg = "warn"
3942
doc-link-code = "warn"
4043
doc-link-with-quotes = "warn"

rust-toolchain

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
stable

0 commit comments

Comments
 (0)