Skip to content

Add --all-targets to just lint to match CI#717

Merged
fiskus merged 1 commit into
mainfrom
lint-all-targets
Jun 12, 2026
Merged

Add --all-targets to just lint to match CI#717
fiskus merged 1 commit into
mainfrom
lint-all-targets

Conversation

@fiskus

@fiskus fiskus commented Jun 12, 2026

Copy link
Copy Markdown
Member

Summary

  • Add --all-targets to both cargo clippy invocations in the just lint recipe so local lint covers test code, matching CI (test-quilt-rs.yaml runs clippy with --all-targets). Previously, test-only clippy errors (e.g. the similar_names failures on Update Rust crate test-log to v0.2.21 #706) surfaced only in CI.
  • Fix the one field_reassign_with_default error this exposes in a quilt-sync test by using struct-update initialization.

No changelog entry: internal tooling/test-only change with no user-visible behavior.

Testing

  • just lint passes on rust 1.96.0
  • cargo test -p quilt-sync autosync_settings_data_preserves_close_to_tray passes

Greptile Summary

Aligns the local just lint recipe with CI by adding --all-targets to both cargo clippy invocations, then fixes the one new lint error this exposes in a test.

  • justfile: --all-targets is appended to both invocations (including the wasm32-targeted one), ensuring test code is covered locally just as in test-quilt-rs.yaml.
  • quilt-sync/src-tauri/src/commands.rs: The field_reassign_with_default lint in autosync_settings_data_preserves_close_to_tray is resolved by switching to struct-update-syntax initialization, which is the idiomatic Rust fix.

Confidence Score: 5/5

Safe to merge — both changes are narrowly scoped to developer tooling and a test-only refactor with no effect on shipped code.

The justfile edit only touches the local lint recipe; it cannot break builds or runtime behavior. The commands.rs change rewrites a single test initializer to idiomatic struct-update syntax, leaving the assertion and the code under test completely unchanged.

No files require special attention.

Important Files Changed

Filename Overview
justfile Adds --all-targets to both cargo clippy invocations so the local just lint recipe checks test/bench/example code, matching what CI already does
quilt-sync/src-tauri/src/commands.rs Fixes the field_reassign_with_default lint error exposed by the new --all-targets flag by replacing a two-step default() + field assignment with a single struct-update-syntax initializer in a test

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Developer runs 'just lint'] --> B[cargo clippy --all-targets --all-features]
    A --> C[cargo clippy --target wasm32 -p quilt-sync-ui --all-targets --all-features]
    B --> D{Targets checked}
    C --> E{Targets checked}
    D --> D1[lib / bins]
    D --> D2[tests NEW]
    D --> D3[benches NEW]
    D --> D4[examples NEW]
    E --> E1[wasm lib]
    E --> E2[wasm tests NEW]
    D2 -- exposes field_reassign_with_default --> F[commands.rs test fixed with struct-update syntax]
Loading

Reviews (1): Last reviewed commit: "Add --all-targets to just lint to match ..." | Re-trigger Greptile

CI lints test code via --all-targets, but the justfile recipe didn't,
so test-only clippy errors surfaced only in CI. Also fix the one
field_reassign_with_default error this exposes in quilt-sync tests.
@fiskus fiskus marked this pull request as ready for review June 12, 2026 17:03
@fiskus fiskus merged commit 92a0054 into main Jun 12, 2026
3 checks passed
@fiskus fiskus deleted the lint-all-targets branch June 12, 2026 17:06
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.

1 participant