lint: add nursery group, restriction lints, and Rust-level lints#155
Merged
sachiniyer merged 1 commit intomainfrom Mar 7, 2026
Merged
lint: add nursery group, restriction lints, and Rust-level lints#155sachiniyer merged 1 commit intomainfrom
sachiniyer merged 1 commit intomainfrom
Conversation
Enable clippy::nursery as deny. Add 44 restriction lints as deny, with allow for let_underscore_must_use and impl_trait_in_params. Add Rust lints: trivial_casts, trivial_numeric_casts, unused_qualifications, unused_import_braces, unused_lifetimes, variant_size_differences. Fix all violations: add const fn where possible, use map_or_else for option_if_let_else, fix unseparated literal suffixes, replace string slice indexing with safe get(), fix unused qualifications. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Summary
clippy::nurseryas deny — catchesmissing_const_for_fn,option_if_let_else,or_fun_call, and morestring_slice,get_unwrap,exit,mem_forget), correctness (undocumented_unsafe_blocks,float_cmp_const,infinite_loop), and style (unseparated_literal_suffix,needless_raw_strings,format_push_string)trivial_casts,trivial_numeric_casts,unused_qualifications,unused_import_braces,unused_lifetimes,variant_size_differenceslet_underscore_must_use(intentionallet _ =on terminal writes),impl_trait_in_params(overly pedantic for CLI)Violations fixed
const fnto 12 pure functions across types, sort_state, render, upgrade, utils, libif let/elsetomap_or/map_or_else(3 sites)unwrap_orwith function call →unwrap_or_else(1 site)100u8→100_u8,0usize→0_usize, etc..get()in auth.rs#[allow]forundocumented_unsafe_blockschrono::qualification in testTest plan
cargo clippy— 0 warnings, 0 errorscargo test— 139 tests passcargo fmt --check— clean🤖 Generated with Claude Code