Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ This repository is written in Rust and uses Cargo for building and dependency
management. Contributors should follow these best practices when working on the
project:

- Run cargo fmt, cargo clippy -- -D warnings, and RUSTFLAGS="-D warnings" cargo
test before committing.
- Run `make fmt`, `make lint`, and `make test` before committing. These targets
wrap `cargo fmt`, `cargo clippy`, and `cargo test` with the appropriate
flags.
- Clippy warnings MUST be disallowed.
- Fix any warnings emitted during tests in the code itself rather than
silencing them.
Expand Down
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.PHONY: lint test fmt

# Run Clippy lints across all targets and features, failing on warnings
lint:
cargo clippy --all-targets --all-features -- -D warnings

# Execute tests with warnings treated as errors
# --quiet ensures less verbose output on success
# Use RUSTFLAGS to deny warnings at compile time
# so new warnings cause failures

test:
RUSTFLAGS="-D warnings" cargo test --quiet

# Format the entire workspace
fmt:
cargo fmt --all
2 changes: 1 addition & 1 deletion tests/lifecycle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ async fn teardown_without_setup_does_not_run() {

let app = WireframeApp::new()
.unwrap()
.on_connection_teardown(move |_| {
.on_connection_teardown(move |()| {
let teardown_clone = teardown_clone.clone();
async move {
teardown_clone.fetch_add(1, Ordering::SeqCst);
Expand Down
Loading