Skip to content

Conversation

@vmarcella
Copy link
Member

Summary

Adds a clippy pre-commit hook for Rust changes so commits fail if clippy emits any warnings.

Related Issues

N/A

Changes

  • Added a local clippy hook to .pre-commit-config.yaml that runs rustup run nightly cargo clippy --workspace --all-targets -- -D warnings.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • Feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (updates to docs, specs, tutorials, or comments)
  • Refactor (code change that neither fixes a bug nor adds a feature)
  • Performance (change that improves performance)
  • Test (adding or updating tests)
  • Build/CI (changes to build process or CI configuration)

Affected Crates

  • lambda-rs
  • lambda-rs-platform
  • lambda-rs-args
  • lambda-rs-logging
  • Other: repo dev tooling (pre-commit)

Checklist

  • Code follows the repository style guidelines (cargo +nightly fmt --all)
  • Code passes clippy (cargo clippy --workspace --all-targets -- -D warnings)
  • Tests pass (cargo test --workspace)
  • New code includes appropriate documentation
  • Public API changes are documented
  • Breaking changes are noted in this PR description

Testing

Commands run:

pre-commit validate-config .pre-commit-config.yaml

Manual verification steps (if applicable):

  1. N/A

Screenshots/Recordings

N/A

Platform Testing

  • macOS
  • Windows
  • Linux

Additional Notes

  • The hook uses rustup run nightly ..., matching the existing fmt hook, so contributors will need the nightly toolchain available for pre-commit to run clippy.

@github-actions
Copy link

github-actions bot commented Feb 9, 2026

✅ Coverage Report

📊 View Full HTML Report (download artifact)

Overall Coverage

Metric Value
Total Line Coverage 76.70%
Lines Covered 10233 / 13341

Changed Files in This PR

File Coverage Lines
crates/lambda-rs-platform/src/lib.rs N/A (no coverage data)
crates/lambda-rs-platform/src/physics/mod.rs N/A (no coverage data)
crates/lambda-rs-platform/src/physics/rapier2d.rs 93.48% 43/46
crates/lambda-rs/src/lib.rs N/A (no coverage data)
crates/lambda-rs/src/physics/mod.rs 88.68% 141/159
crates/lambda-rs/src/render/bind.rs 95.25% 281/295
crates/lambda-rs/src/render/buffer.rs 92.56% 224/242
crates/lambda-rs/src/render/color_attachments.rs 96.03% 121/126
crates/lambda-rs/src/render/command.rs 100.00% 13/13
crates/lambda-rs/src/render/encoder.rs 84.09% 502/597
crates/lambda-rs/src/render/gpu.rs 76.88% 133/173
crates/lambda-rs/src/render/instance.rs 93.23% 124/133
crates/lambda-rs/src/render/mesh.rs 91.80% 112/122
crates/lambda-rs/src/render/mod.rs 78.79% 1137/1443
crates/lambda-rs/src/render/pipeline.rs 91.19% 476/522
crates/lambda-rs/src/render/render_pass.rs 80.61% 266/330
crates/lambda-rs/src/render/shader.rs 94.64% 53/56
crates/lambda-rs/src/render/surface.rs N/A (no coverage data)
crates/lambda-rs/src/render/targets/offscreen.rs 83.04% 235/283
crates/lambda-rs/src/render/targets/surface.rs 40.56% 73/180
crates/lambda-rs/src/render/texture.rs 84.28% 327/388
crates/lambda-rs/src/render/validation.rs 100.00% 121/121
crates/lambda-rs/src/render/vertex.rs 92.00% 46/50
crates/lambda-rs/src/render/viewport.rs 95.00% 57/60
crates/lambda-rs/src/render/window.rs 50.53% 48/95

PR Files Coverage: 83.41% (4533/5434 lines)


Generated by cargo-llvm-cov · Latest main coverage

Last updated: 2026-02-09 21:13:51 UTC · Commit: b86ff7e

@vmarcella vmarcella merged commit d93fa76 into main Feb 9, 2026
10 checks passed
@vmarcella vmarcella deleted the vmrcella/add-clippy-precommit-hook branch February 9, 2026 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant