Add --all-targets to just lint to match CI#717
Merged
Merged
Conversation
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.
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
--all-targetsto bothcargo clippyinvocations in thejust lintrecipe so local lint covers test code, matching CI (test-quilt-rs.yamlruns clippy with--all-targets). Previously, test-only clippy errors (e.g. thesimilar_namesfailures on Update Rust crate test-log to v0.2.21 #706) surfaced only in CI.field_reassign_with_defaulterror this exposes in aquilt-synctest by using struct-update initialization.No changelog entry: internal tooling/test-only change with no user-visible behavior.
Testing
just lintpasses on rust 1.96.0cargo test -p quilt-sync autosync_settings_data_preserves_close_to_traypassesGreptile Summary
Aligns the local
just lintrecipe with CI by adding--all-targetsto bothcargo clippyinvocations, then fixes the one new lint error this exposes in a test.justfile:--all-targetsis appended to both invocations (including the wasm32-targeted one), ensuring test code is covered locally just as intest-quilt-rs.yaml.quilt-sync/src-tauri/src/commands.rs: Thefield_reassign_with_defaultlint inautosync_settings_data_preserves_close_to_trayis 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
justfileedit only touches the local lint recipe; it cannot break builds or runtime behavior. Thecommands.rschange 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
--all-targetsto bothcargo clippyinvocations so the localjust lintrecipe checks test/bench/example code, matching what CI already doesfield_reassign_with_defaultlint error exposed by the new--all-targetsflag by replacing a two-stepdefault()+ field assignment with a single struct-update-syntax initializer in a testFlowchart
%%{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]Reviews (1): Last reviewed commit: "Add --all-targets to just lint to match ..." | Re-trigger Greptile