feat(cargo-anvil): split managed lint regions - #191
martin-kolinek wants to merge 7 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The TOML-adoption snapshot still omits the newly generated lint entry.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Moves clippy::empty_structs_with_brackets into cargo-anvil’s managed lint catalog and synchronizes documentation, tests, generated outputs, and checksums.
Changes:
- Added the lint to the catalog and root workspace policy.
- Updated catalog documentation and invariant tests.
- Refreshed backend snapshots and
.anvil.lock.
File summaries
| File | Description |
|---|---|
Cargo.toml |
Adds the lint to the managed workspace catalog. |
crates/cargo-anvil/templates/regions/cargo-lints-body.toml |
Defines the generated catalog entry. |
crates/cargo-anvil/src/anvil/artifacts/region.rs |
Updates catalog tests and exclusions. |
crates/cargo-anvil/docs/design/README.md |
Documents catalog policy. |
crates/cargo-anvil/tests/snapshots/*.snap |
Updates emitted backend snapshots. |
.anvil.lock |
Updates catalog and region checksums. |
Review details
- Files reviewed: 7/8 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The workspace policy drops clippy.too_long_first_doc_paragraph without preserving or documenting that behavior change.
Get a fresh assessment by requesting another Copilot review.
Review details
- Files reviewed: 8/9 changed files
- Comments generated: 1
- Review effort level: Lite
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The root workspace policy drops clippy.too_long_first_doc_paragraph without documenting or replacing that behavior.
Review details
Suppressed comments (1)
Cargo.toml:185
- This hunk also removes
clippy.too_long_first_doc_paragraphfrom the root[workspace.lints]policy: the deleted block was its only occurrence, and the updated template/catalog has no replacement (the repository now has no matches). That changes every workspace crate's lint policy even though this PR is described as addingempty_structs_with_brackets; please retain the existing entry outside the managed region or add it to the catalog, or document the intentional policy removal.
clippy.empty_structs_with_brackets = "warn"
- Files reviewed: 8/9 changed files
- Comments generated: 0 new
- Review effort level: Lite
There was a problem hiding this comment.
🟢 Approval recommended
The catalog, generated outputs, documentation, tests, snapshots, and checksums are synchronized with no unresolved issues found.
Review details
- Files reviewed: 8/9 changed files
- Comments generated: 0 new
- Review effort level: Lite
Codecov Report❌ Patch coverage is
❌ Your project status has failed because the head coverage (97.5%) is below the target coverage (100.0%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #191 +/- ##
=======================================
- Coverage 97.6% 97.5% -0.1%
=======================================
Files 304 304
Lines 69683 69869 +186
=======================================
+ Hits 68016 68189 +173
- Misses 1667 1680 +13
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The migration drops an existing lint policy, and generated lock provenance still reports version 0.11.0.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (1)
Cargo.toml:209
- The previous repository-owned
clippy.too_long_first_doc_paragraph = "warn"policy is removed from this manifest, but it is neither in the newcargo-clippy-lints.tomlcatalog nor preserved as a bare key after this sentinel. That silently drops an existing lint policy during the split; keep it as a repository-specific bare assignment after the Clippy region (or explicitly retain it in another supported policy surface).
# <<< anvil-managed: anvil-workspace-clippy-lints
- Files reviewed: 23/25 changed files
- Comments generated: 1
- Review effort level: Lite
There was a problem hiding this comment.
🔵 Needs a closer look
Documentation still overstates legacy-region retirement and references the deleted combined lint template.
Review details
Suppressed comments (2)
Previously missed (2) — in code that hasn't changed since the last review.
crates/cargo-anvil/templates/regions/cargo-lints-body.toml:1
- Removing this template leaves stale references to its path in the surviving source and generated comments:
templates/regions/clippy.toml:26-27andtemplates/justfiles/anvil/checks/miri-tree-borrows.just:14-15(also the checked-in copies). Update those references to the split catalog/template before deleting this file, otherwise emitted guidance points at a nonexistentcargo-lints-body.toml.
crates/cargo-anvil/docs/design/updates.md:176 - This migration is not unconditional:
ComposedHosts::retiring_regionsonly treats a recorded, unchanged (or empty) legacy region as retiring (src/run.rs:770-798), while an edited legacy region is kept and refused (src/run.rs:1093-1104). Please qualify this paragraph so the design contract does not promise retirement for customized old blocks.
- Files reviewed: 23/25 changed files
- Comments generated: 0 new
- Review effort level: Lite
|
🤖 Splits Cargo lint management into separate Rust, rustdoc, and Clippy regions backed by explicit
[workspace.lints.<namespace>]/[lints.<namespace>]tables.cargo sort --groupedempty_structs_with_brackets = "warn"and the catalog-levelliteral_string_with_formatting_args = "allow"overridetoo_long_first_doc_paragraphentry because the catalog'snursery = "warn"group already enables itOxidizer PR microsoft/oxidizer#769 adopts this layout while preserving its local
missing_docs,unreachable_pub, andclippy::panicpolicy.