Skip to content

Commit 9365904

Browse files
Lewis-Eclaude
andcommitted
chore: treat clippy warnings as errors in CI and document pre-push hook
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
1 parent f111a2f commit 9365904

3 files changed

Lines changed: 12 additions & 4 deletions

File tree

.githooks/pre-push

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ echo ">>> [pre-push] Running cargo fmt --check..."
55
if ! cargo fmt --all -- --check; then
66
echo ""
77
echo "HOOK FAILED: cargo fmt check failed."
8-
echo "LLM FIX: run 'cargo fmt --all' then re-attempt the push."
8+
echo "Try 'cargo fmt --all' then re-attempt the push."
99
exit 1
1010
fi
1111

1212
echo ">>> [pre-push] Running cargo clippy..."
1313
if ! cargo clippy --workspace --all-targets --all-features -- -D warnings; then
1414
echo ""
1515
echo "HOOK FAILED: cargo clippy reported warnings or errors."
16-
echo "LLM FIX: fix the clippy diagnostics above, then re-attempt the push."
16+
echo "Fix the clippy diagnostics above, then re-attempt the push."
1717
exit 1
1818
fi
1919

.github/workflows/cargo.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
# doesn't fail.
6161
export AWS_LC_FIPS_SYS_NO_ASM=1
6262
fi
63-
cargo clippy --workspace --all-features
63+
cargo clippy --workspace --all-features -- -D warnings
6464
6565
build:
6666
name: Build

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
# Serverless Components
22

3-
A collection of libraries and binaries used for instrumenting AWS Lambda Functions, Azure Functions, and Azure Spring Apps.
3+
A collection of libraries and binaries used for instrumenting AWS Lambda Functions, Azure Functions, and Azure Spring Apps.
4+
5+
## Development
6+
7+
Install the git pre-push hook (runs `cargo fmt --check` and `cargo clippy -D warnings` before each push):
8+
9+
```sh
10+
git config core.hooksPath .githooks
11+
```

0 commit comments

Comments
 (0)