Skip to content

feat(rules): workspace-manifest sets one resolver and one edition, which every crate inherits - #36

Draft
PiquelChips wants to merge 1 commit into
refactor/toml-filesfrom
feat/rule-workspace-manifest
Draft

PiquelChips wants to merge 1 commit into
refactor/toml-filesfrom
feat/rule-workspace-manifest

Conversation

@PiquelChips

@PiquelChips PiquelChips commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Stacked on #35; part of a stack adding the standard's rules over manifests, config files, workflows, recipes and docs. Rebased onto #13's head c4a57df.

What and why

LY1: every workspace uses resolver = "3" and edition 2024, set once at the root. Nothing checks it.

  • The root's [workspace] sets resolver = "3", [workspace.package] sets edition = "2024", and every crate has edition.workspace = true.
  • --fix makes a crate that repeats the workspace's edition inherit it. It doesn't change an edition (that needs cargo fix --edition) or the resolver.
  • The README's --fix sentence now gives examples ("such as"), so later rules' fixes don't each edit it.
  • The fix is a toml_edit edit writing edition.workspace = true as a dotted key.

Measured

piqueld sourceorigin DirkEngine
Violations 0 0 0

Measured read-only at origin/main: piqueld a17710f52, sourceorigin e99cc0e6b, DirkEngine 07e8ba44.

A guard for new repositories and crates.

Testing

  • New fixture tests: a missing resolver, a 2021 workspace edition, a crate with no edition, a crate with its own; the fix leaves no violation.
  • At this commit: Clippy with -D warnings, cargo nextest run --workspace and cargo xtask standard pass with a clean tree; just readme regenerated the rules list.
  • At the stack's tip: just check-changed origin/feat/readme-standard passes (fmt-check, audit, unused, standard, lint, doc, test, doc-test, package).

Checklist

  • The crate's README (its documentation on docs.rs) shows the change, and a repository's xtask can still follow it.
  • A change to the public API is noted for the next release, with what each repository's xtask must change. (A new rule: each repository fixes its violations (cargo xtask standard --fix where a fix exists) or adds a deviation with its reason.)
  • just check-changed passes.

Note

Written by Claude Opus 5.5 in Claude Code (via T3 Code)

@PiquelChips
PiquelChips force-pushed the feat/rule-workspace-manifest branch from 77a7feb to ad0992f Compare November 22, 2026 22:30
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