all: bump {cargo,flake} deps, fix clippy lints#619
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughWorkspace dependency Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
cdd0a11 to
291480a
Compare
291480a to
afcac1f
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
Cargo.toml (1)
85-85: Replace the workspace-wide Clippy allow with local annotations on specific structs.The workspace-wide
struct_excessive_boolsallow at line 85 suppresses this lint across all crates. However, only four structs actually have ≥4 bool fields:
NixBuildPassthroughArgs(20 bool fields) in crates/nh-core/src/args.rs:50CleanArgs(5 bool fields) in crates/nh-clean/src/args.rs:24OsRebuildArgs(4 bool fields) in crates/nh-nixos/src/args.rs:143OsRollbackArgs(4 bool fields) in crates/nh-nixos/src/args.rs:216Use targeted
#[allow(clippy::struct_excessive_bools)]on these structs instead to preserve lint signal elsewhere.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Cargo.toml` at line 85, The workspace-wide clippy allow `struct_excessive_bools` should be removed from Cargo.toml and replaced with targeted annotations: add `#[allow(clippy::struct_excessive_bools)]` directly above the struct definitions for NixBuildPassthroughArgs, CleanArgs, OsRebuildArgs, and OsRollbackArgs so the lint is only suppressed for those four structs while restoring the lint elsewhere.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@Cargo.toml`:
- Line 28: Update the clap_mangen dependency declaration to enable the env
feature so environment-backed arguments are supported: change the clap_mangen
entry in Cargo.toml to include features = ["env"] (keeping version "0.3.0");
this ensures the Main command usage of env = "NH_ELEVATION_STRATEGY" in the
interface.rs code and the man page generation in xtask/src/man.rs will correctly
handle environment variables when producing the man pages.
---
Nitpick comments:
In `@Cargo.toml`:
- Line 85: The workspace-wide clippy allow `struct_excessive_bools` should be
removed from Cargo.toml and replaced with targeted annotations: add
`#[allow(clippy::struct_excessive_bools)]` directly above the struct definitions
for NixBuildPassthroughArgs, CleanArgs, OsRebuildArgs, and OsRollbackArgs so the
lint is only suppressed for those four structs while restoring the lint
elsewhere.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 7acb2157-0d33-4359-bef7-c9bab5931d0a
📒 Files selected for processing (8)
Cargo.tomlcrates/nh-core/src/checks.rscrates/nh-core/src/command.rscrates/nh-core/src/installable.rscrates/nh-core/src/util.rscrates/nh-home/src/home.rscrates/nh-nixos/src/args.rscrates/nh-nixos/src/generations.rs
💤 Files with no reviewable changes (1)
- crates/nh-nixos/src/args.rs
✅ Files skipped from review due to trivial changes (4)
- crates/nh-core/src/util.rs
- crates/nh-home/src/home.rs
- crates/nh-core/src/command.rs
- crates/nh-nixos/src/generations.rs
🚧 Files skipped from review as they are similar to previous changes (1)
- crates/nh-core/src/checks.rs
|
Merging once CI passes |
Sanity Checking
nix fmtto format my Nix codecargo fmtto format my Rust codecargo clippyand fixed any new linter warnings.logic
description.
x86_64-linuxaarch64-linuxx86_64-darwinaarch64-darwinAdd a 👍 reaction to pull requests you find important.
Summary by CodeRabbit
Refactor
Chores
Tests