Repository navigation
Adopt clippy::pedantic across the Rust crates - #660
Closed
tinder-maxwellelliott wants to merge 1 commit into
Closed
tinder-maxwellelliott wants to merge 1 commit into
tinder-maxwellelliott wants to merge 1 commit into
Conversation
Every first-party crate (the bazel-diff lib and binary, the e2e suite and tools/coverage) now opts into clippy::pedantic at the crate root, with a short, commented allow list for the lints that do not fit a CLI crate (the doc-section and must_use lints, too_many_lines, similar_names, struct_excessive_bools, case-sensitive extension checks on Bazel labels, implicit_hasher). The generated protobuf module is exempt. The rest of the warnings are fixed, and most of the fixes simplify the code they touch: match-for-destructuring becomes if-let/let-else, format!-then-push_str becomes write!/writeln!, Result wrappers that could not fail are gone (deduplicate_targets, prune_cache), arguments that were cloned to be passed by value are borrowed instead (break_module_cycles, compute_query, normalize_path, probe_options), with_exclude_filter consumes its query instead of cloning it, the extension-failure bookkeeping moves onto FailedExtensions as methods instead of taking an unused &self on BazelOptions, and one elapsed_millis helper (now saturating instead of truncating) replaces two copies. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJs3XwoUGNh7WtEZHGSPVn
Collaborator
Author
|
@copilot resolve the merge conflicts on this branch. |
Collaborator
Author
|
Superseded by #661, which carries the same change merged with master. This branch lives on a fork the Tinder account cannot push to. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every first-party crate (the bazel-diff lib and binary, the e2e suite and tools/coverage) now opts into clippy::pedantic at the crate root, with a short, commented allow list for the lints that do not fit a CLI crate (the doc-section and must_use lints, too_many_lines, similar_names, struct_excessive_bools, case-sensitive extension checks on Bazel labels, implicit_hasher). The generated protobuf module is exempt.
The rest of the warnings are fixed, and most of the fixes simplify the code they touch: match-for-destructuring becomes if-let/let-else, format!-then-push_str becomes write!/writeln!, Result wrappers that could not fail are gone (deduplicate_targets, prune_cache), arguments that were cloned to be passed by value are borrowed instead (break_module_cycles, compute_query, normalize_path, probe_options), with_exclude_filter consumes its query instead of cloning it, the extension-failure bookkeeping moves onto FailedExtensions as methods instead of taking an unused &self on BazelOptions, and one elapsed_millis helper (now saturating instead of truncating) replaces two copies.