Skip to content

Enable clippy and disallow duplicate crate versions#142

Open
ReinierMaas wants to merge 10 commits into
masterfrom
reinier/enable-clippy
Open

Enable clippy and disallow duplicate crate versions#142
ReinierMaas wants to merge 10 commits into
masterfrom
reinier/enable-clippy

Conversation

@ReinierMaas

Copy link
Copy Markdown
Contributor

The current set of duplicated crates is whitelisted. This set of duplicated dependencies can be reduced in an upcoming PR instead. When I wanted to run just clippy I discovered it was never enabled in the repository due to it not triggering. This was because of a missing boolean in the specific Cargo.tomls....

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enables workspace-level Clippy linting (including denying multiple crate versions) and updates Rust + PyO3 binding code to satisfy the newly enforced lints without changing core functionality.

Changes:

  • Enable workspace lints in member crates and deny clippy::multiple_crate_versions, with an explicit allowlist in clippy.toml.
  • Update just clippy to lint --all-targets across feature combinations so Clippy actually triggers consistently.
  • Apply widespread small refactors and documentation/attribute tweaks (e.g., #[must_use], explicit drops, select patterns, type conversions, doc clarifications) to resolve Clippy findings.

Reviewed changes

Copilot reviewed 33 out of 33 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
opsqueue/src/tracing.rs Adds #[must_use] and minor cleanup to satisfy Clippy.
opsqueue/src/server.rs Adjusts router plumbing, shutdown handling, and Clippy suppressions/docs.
opsqueue/src/prometheus.rs Adds lint allows/docs and minor numeric conversion cleanup for Clippy.
opsqueue/src/producer/server.rs Doc/comment cleanup and minor match tightening for lint compliance.
opsqueue/src/producer/client.rs Adds docs/#[must_use], refines retry logic and option handling per Clippy.
opsqueue/src/object_store/mod.rs Refines error imports, stream API, and adds docs/#[must_use].
opsqueue/src/lib.rs Marks version_info() as #[must_use] and adjusts doc link formatting.
opsqueue/src/db/mod.rs Adds docs/#[must_use], improves logging, and refactors for Clippy.
opsqueue/src/db/conn.rs Narrows imports to satisfy linting.
opsqueue/src/consumer/strategy.rs Refines imports/formatting and updates test formatting per Clippy.
opsqueue/src/consumer/server/state.rs Adds #[must_use] and clarifying docs for error/panic behavior.
opsqueue/src/consumer/server/mod.rs Adds docs/#[must_use] and minor metric recording statement fixes.
opsqueue/src/consumer/server/conn.rs Refactors match arms/imports and adds docs/#[must_use].
opsqueue/src/consumer/dispatcher/reserver.rs Tweaks defaults/types for metrics and tokio::select! patterns.
opsqueue/src/consumer/dispatcher/mod.rs Refactors reservation flow to satisfy stream/lint constraints.
opsqueue/src/consumer/dispatcher/metastate.rs Adjusts APIs to pass Copy values by value and adds docs/#[must_use].
opsqueue/src/consumer/common.rs Doc formatting improvements for Rustdoc links/code formatting.
opsqueue/src/consumer/client.rs Clarifies docs, refines control flow, and updates tests for lint compliance.
opsqueue/src/config.rs Doc formatting tweaks and adds docs/#[must_use] on helper APIs.
opsqueue/src/common/submission.rs Adds docs/#[must_use], refactors branches/logging, and updates conversions for Clippy.
opsqueue/src/common/mod.rs Adds docs and refines invariants documentation for MaxSubmissions.
opsqueue/src/common/chunk.rs Doc formatting cleanup and adds docs/#[must_use] on constructors/helpers.
opsqueue/Cargo.toml Enables workspace lints via [lints] workspace = true.
opsqueue/app/main.rs Minor control-flow / select pattern refinements and adds runtime docs.
libs/opsqueue_python/src/producer.rs Renames field, adds extensive error docs, and refactors chunk streaming glue.
libs/opsqueue_python/src/errors.rs Doc formatting improvements for PyErr-related text.
libs/opsqueue_python/src/consumer.rs Adds error docs and minor lint suppressions for bindings.
libs/opsqueue_python/src/common.rs Doc additions, small refactors, and runtime/docs improvements.
libs/opsqueue_python/src/async_util.rs Doc formatting tweaks and clearer PyO3 wording.
libs/opsqueue_python/Cargo.toml Enables workspace lints via [lints] workspace = true.
justfile Ensures Clippy runs with --all-targets across feature sets.
clippy.toml Adds allowed-duplicate-crates allowlist supporting multiple_crate_versions = deny.
Cargo.toml Denies clippy::multiple_crate_versions at workspace lint level.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread opsqueue/src/common/mod.rs Outdated
Comment thread opsqueue/src/common/chunk.rs Outdated
@ReinierMaas
ReinierMaas requested a review from jerbaroo July 17, 2026 20:47
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.

2 participants