Skip to content

chore: fix all clippy issues #147

Merged
branchseer merged 17 commits intomainfrom
02-09-chore_fix_clippy_issues
Feb 10, 2026
Merged

chore: fix all clippy issues #147
branchseer merged 17 commits intomainfrom
02-09-chore_fix_clippy_issues

Conversation

@branchseer
Copy link
Copy Markdown
Member

@branchseer branchseer commented Feb 10, 2026

Resolve all errors from cargo clippy --workspace --all-targets --all-features -- --deny warnings
across every crate.

Copy link
Copy Markdown
Member Author

branchseer commented Feb 10, 2026

@branchseer branchseer changed the title cargo clippy --all-targets --fix chore: fix all clippy warnings across workspace Feb 10, 2026
@branchseer branchseer changed the title chore: fix all clippy warnings across workspace chore: fix all clippy issues Feb 10, 2026
@branchseer branchseer marked this pull request as ready for review February 10, 2026 05:27
@branchseer branchseer requested a review from fengmk2 February 10, 2026 07:43
Copy link
Copy Markdown
Member Author

branchseer commented Feb 10, 2026

Merge activity

  • Feb 10, 12:07 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Feb 10, 12:11 PM UTC: Graphite rebased this pull request as part of a merge.
  • Feb 10, 12:11 PM UTC: @branchseer merged this pull request with Graphite.

@branchseer branchseer changed the base branch from refactor_change_UserTaskOptions_to_UserCacheConfig_for_synthetic_tasks to graphite-base/147 February 10, 2026 12:08
@branchseer branchseer changed the base branch from graphite-base/147 to main February 10, 2026 12:09
branchseer and others added 17 commits February 10, 2026 12:10
Resolve all errors from `cargo clippy --workspace --all-targets --all-features -- --deny warnings`
across every crate. Key changes:

- Replace disallowed types (HashMap→FxHashMap, HashSet→FxHashSet, String→Str, PathBuf→AbsolutePath)
  per workspace .clippy.toml, using #[expect] with reasons where external APIs require std types
- Replace std::format! with vite_str::format! and str::replace with cow_utils::cow_replace
- Add #[expect] attributes (never #[allow]) for unavoidable lints like future_not_send,
  large_futures, large_enum_variant, too_many_lines, each with a reason
- Add missing `# Errors` doc sections on public fallible functions
- Fix option_if_let_else, significant_drop_tightening, similar_names, pass_by_value,
  match_same_arms, items_after_statements, and other pedantic lints
- Add per-crate .clippy.toml for fspy_e2e and vite_path where derive macros need std types
- Convert fspy test_utils.rs from file to module directory for proper #[expect] scoping

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix const fn with non-const Windows code path in native_str.rs
- Add non-vite crate allows to fspy_detours_sys, fspy_preload_windows
- Fix all clippy warnings in Windows-only code (SAFETY comments, expect
  attrs, format args, const fns, etc.)
- Fix unfulfilled lint expectations with cfg_attr for platform-specific code
- Move CI clippy check into test job, rename lint job to fmt

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Revert linux.rs macro exports to pub(crate) (macro_rules! macros
  cannot be pub, causing E0364 on Linux)
- Use pub(crate) glob re-export with redundant_pub_crate expect
- Move SAFETY comment to directly precede unsafe block in winapi_utils
- Add clippy component to test job's setup-rust step

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Artifact dependencies (fspy_test_bin) target linux-musl, which requires
a musl-capable linker. On non-Linux hosts, delegate to cargo-zigbuild's
zig cc via wrapper scripts in .cargo/.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Move wildcard_imports allow to crate-level in fspy_detours_sys to
  avoid unfulfilled expect on test target and bindgen test failure
- Fix all clippy warnings in fspy_seccomp_unotify: add SAFETY comments,
  feature-gate bindings module, fix unreadable literals, add missing
  docs, and address pedantic/nursery lints

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add SAFETY comment and doc sections for fspy_shared_unix Linux code
- Fix useless as_ref() in elf.rs, derivable_impls in shebang.rs
- Suppress struct_field_names for seccomp_payload field
- Restore original individual use statements in generated_bindings.rs
  to match bindgen test expectations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add generated_bindings.rs to rustfmt ignore list to prevent
  imports_granularity from consolidating bindgen-generated imports
- Use cfg_attr to conditionally apply derivable_impls expect only
  on non-Apple targets where the lint fires

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fully restore generated_bindings.rs to match bindgen test output
  (previous cargo clippy --fix reformatted the prettyplease output)
- Fix #[allow(unused)] in intercept_inner macro to satisfy
  allow_attributes and allow_attributes_without_reason lints

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add SAFETY comments to all unsafe blocks in macro-generated and
  interception code
- Fix format string inlining, unnecessary semicolons, explicit deref
- Convert match-for-equality to if, fix wildcard imports
- Fix assert_eq!(x, true/false) to assert!(x)/assert!(!x) in elf tests
- Fix redundant closure and needless borrow in fspy crate

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add `just lint-linux` and `just lint-windows` for cross-compiling clippy
checks via cargo-zigbuild and cargo-xwin, and document them in CLAUDE.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@branchseer branchseer force-pushed the 02-09-chore_fix_clippy_issues branch from 420d3d7 to 9e4a26e Compare February 10, 2026 12:10
@branchseer branchseer merged commit 881b5d3 into main Feb 10, 2026
6 checks passed
@branchseer branchseer deleted the 02-09-chore_fix_clippy_issues branch February 10, 2026 12:11
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