Skip to content

lint: upgrade perfectionist#433

Merged
KSXGitHub merged 8 commits into
masterfrom
claude/pensive-euler-jB42G
May 29, 2026
Merged

lint: upgrade perfectionist#433
KSXGitHub merged 8 commits into
masterfrom
claude/pensive-euler-jB42G

Conversation

@KSXGitHub
Copy link
Copy Markdown
Owner

@KSXGitHub KSXGitHub commented May 29, 2026

Summary

Upgrades the perfectionist dylint library from 0.0.0-rc.14 to the newly released 0.0.0-rc.17 and resolves the lint violations that the newer rules surface across the codebase.

Configuration changes (dylint.toml)

  • Bump the perfectionist git tag from 0.0.0-rc.14 to 0.0.0-rc.17.
  • Remove the legacy [perfectionist] disable block that silenced arc_rc_clone. The current release no longer requires it.
  • Configure the new import_granularity rule with style = "crate", matching the crate-granularity merged imports already used throughout the project. Moving to "module" granularity is deferred and tracked in Change import_granularity style from crate to module #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 separate use clap::... statements in src/usage_md.rs into a single statement.
  • single_letter_let_binding: Rename the single-letter a/b/c fixtures 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 as first_order/second_order/sorted_order, complete/missing_one, and with_row_6/with_row_7.
  • bare_url: Wrap the bare URL in the Temp doc comment (tests/_utils.rs) in angle brackets.
  • lint_silence_reason: Add explanatory reason = "..." fields to the clippy::float_cmp allowances in tests/args_fraction.rs and to the clippy::identity_op and clippy::erasing_op expectations in tests/hardlinks_deduplication.rs and tests/hardlinks_deduplication_multi_args.rs.

Related issues

Verification

FMT=true LINT=true BUILD=true TEST=true DOC=true DYLINT=true ./test.sh passes, 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

claude added 2 commits May 28, 2026 18:06
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
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 29, 2026

Performance Regression Reports

commit: bc33b83

There are no regressions.

claude added 2 commits May 29, 2026 08:03
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
Comment thread cli/ai_instructions.rs Outdated
claude added 3 commits May 29, 2026 08:53
…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
@KSXGitHub KSXGitHub changed the title lint: upgrade perfectionist lint: upgrade perfectionist May 29, 2026
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 KSXGitHub marked this pull request as ready for review May 29, 2026 14:03
@KSXGitHub KSXGitHub merged commit 4849235 into master May 29, 2026
15 checks passed
@KSXGitHub KSXGitHub deleted the claude/pensive-euler-jB42G branch May 29, 2026 14:03
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
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