lint: upgrade perfectionist#433
Merged
Merged
Conversation
Bump the perfectionist dylint library from 0.0.0-rc.14 to 0.0.0-rc.16 and drop the now-removed arc_rc_clone disable entry. Add narrow, module-level suppression for a confirmed false positive in the rc.16 lint_silence_reason rule, which fires on the `#[allow]` attributes that clap's derive macro synthesizes for every field of a `#[derive(Parser)]` struct. The suppression is scoped to the two modules that define such structs and references the tracking issue. Refs #430
The perfectionist import_granularity lint defaults to module granularity, which conflicts with the crate-granularity merged imports used throughout the codebase. Set the style to crate for now so the lint matches the existing convention. Switching to module is tracked in #432. https://claude.ai/code/session_015ZyokLaZvcy5Yt8KpPxV3F
Performance Regression Reportscommit: bc33b83 There are no regressions. |
The perfectionist rc.16 upgrade introduced new lints that flag existing test code. Resolve each violation so the Dylint check passes: - Rename the single-letter a/b/c fixtures in the hardlink tests to descriptive names that convey each operand's role. - Wrap the bare URL in tests/_utils.rs in angle brackets. - Add explanatory reason fields to the clippy lint-silencing attributes in the hardlink deduplication and fraction tests. https://claude.ai/code/session_015ZyokLaZvcy5Yt8KpPxV3F
…ason suppressions perfectionist PR 172 fixes the lint_silence_reason false positive on `clap`-derive-generated `#[allow]` attributes (#430). Point the dylint library at the fix commit and remove the now-unnecessary module-level suppressions in src/args.rs and cli/ai_instructions.rs. Dylint passes with the suppressions removed. https://claude.ai/code/session_015ZyokLaZvcy5Yt8KpPxV3F
KSXGitHub
commented
May 29, 2026
…ructions The `feature(register_tool)` and `register_tool(perfectionist)` crate attributes were only required to support the `perfectionist::lint_silence_reason` suppression, which has since been removed. With no remaining `perfectionist::` attributes in the file, these are dead and can go. https://claude.ai/code/session_015ZyokLaZvcy5Yt8KpPxV3F
Point the dylint library at the perfectionist PR 173 fix commit. Dylint passes with no new violations, so the additional cases the fix now inspects already comply with the configured rules. https://claude.ai/code/session_015ZyokLaZvcy5Yt8KpPxV3F
perfectionist 34be521 (PR 173) fixes import_granularity so it now detects multiple `use clap::...` statements that should be merged under the `crate` style. Combine the two clap imports in src/usage_md.rs into a single statement. https://claude.ai/code/session_015ZyokLaZvcy5Yt8KpPxV3F
The fixes that were being verified via pinned commits (PRs 172 and 173) are now in the 0.0.0-rc.17 release. Pin the dylint library to the tag instead of a short commit. Verified with a clean dylint build. https://claude.ai/code/session_015ZyokLaZvcy5Yt8KpPxV3F
KSXGitHub
pushed a commit
that referenced
this pull request
May 29, 2026
The `perfectionist` upgrade in #433 tightened the `single_letter_let_binding` rule, which no longer permits single-letter `let` bindings for interchangeable test fixtures. That leeway was the reason #433 renamed fixtures such as `a`/`b`/`c` to descriptive names. Remove the now-contradicted test-fixtures exception from CONTRIBUTING.md and the AI instruction templates, and state that `let` bindings must use descriptive names in test code as well as non-test code. https://claude.ai/code/session_01CMrfXtuzxpSbchSJNuwboK
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
Upgrades the
perfectionistdylint library from0.0.0-rc.14to the newly released0.0.0-rc.17and resolves the lint violations that the newer rules surface across the codebase.Configuration changes (
dylint.toml)perfectionistgit tag from0.0.0-rc.14to0.0.0-rc.17.[perfectionist] disableblock that silencedarc_rc_clone. The current release no longer requires it.import_granularityrule withstyle = "crate", matching the crate-granularity merged imports already used throughout the project. Moving to"module"granularity is deferred and tracked in Changeimport_granularitystyle fromcratetomodule#432.Lint fixes
The upgrade enables several rules that flag existing code. Each violation is resolved at the source rather than suppressed:
import_granularity: Collapse the two separateuse clap::...statements insrc/usage_md.rsinto a single statement.single_letter_let_binding: Rename the single-lettera/b/cfixtures in the hardlink tests (src/hardlink/hardlink_list/test.rs,src/hardlink/link_path_list/test.rs) to names that convey each operand's role, such asfirst_order/second_order/sorted_order,complete/missing_one, andwith_row_6/with_row_7.bare_url: Wrap the bare URL in theTempdoc comment (tests/_utils.rs) in angle brackets.lint_silence_reason: Add explanatoryreason = "..."fields to theclippy::float_cmpallowances intests/args_fraction.rsand to theclippy::identity_opandclippy::erasing_opexpectations intests/hardlinks_deduplication.rsandtests/hardlinks_deduplication_multi_args.rs.Related issues
import_granularitystyle fromcratetomodule#432 tracks the eventual switch ofimport_granularityfromcratetomodule.lint_silence_reasonandimport_granularityfalse positives reported in perfectionist 0.0.0-rc.16:lint_silence_reasonfalse-positives on#[derive(clap::Parser)]fields #430 and perfectionist 0.0.0-rc.16:import_granularityskips separate-file submodules (mod foo;) #431 are fixed upstream and included in0.0.0-rc.17, so no in-source suppressions are needed for them.Verification
FMT=true LINT=true BUILD=true TEST=true DOC=true DYLINT=true ./test.shpasses, with the dylint build cache cleared beforehand so the library is rebuilt from the pinned tag. The FUSE-dependent and root-only integration tests are skipped in environments that cannot run them.https://claude.ai/code/session_015ZyokLaZvcy5Yt8KpPxV3F