Skip to content

feat(rules): layout keeps crates under crates/, apps/ and tools/, and cargo xtask locked - #37

Draft
PiquelChips wants to merge 1 commit into
feat/rule-workspace-manifestfrom
feat/rule-layout
Draft

PiquelChips wants to merge 1 commit into
feat/rule-workspace-manifestfrom
feat/rule-layout

Conversation

@PiquelChips

@PiquelChips PiquelChips commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Stacked on #36; 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

LY2 and TC4's first half: crates live under crates/, apps/ or tools/, tasks in tools/xtask, and cargo xtask runs --locked. Most of the unlocked Cargo commands the inventory counted were cargo xtask, so fixing the alias fixes them all.

  • Every workspace crate lives under crates/, apps/ or tools/ (nested members such as crates/dirk_renderer/shaders pass).
  • An xtask crate exists at tools/xtask.
  • .cargo/config.toml aliases xtask to run --locked --package xtask -- (a string or a list).
  • --fix sets the alias through toml_edit, creating .cargo/config.toml if needed: Fix::apply_all now starts a missing file from an empty document.
  • Tests get Fixture::fix_rule(rule), which makes one rule's fixes only, and every fixture holds the config files the standard requires (CONFIG, removed with Fixture::remove), so the existing fix tests that list every fix stay as they are.

Measured

piqueld sourceorigin DirkEngine
Violations 1 1 3

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

  • piqueld, sourceorigin: the alias lacks --locked (fixable).
  • DirkEngine: the root manifest is a crate, there is no tools/xtask, and no alias. DirkEngine waits for its API overhaul.

Testing

  • New fixture tests: crates in each directory and one beside them, an unlocked alias, an xtask crate outside tools/, and the fix from no config file, a config without [alias], and a wrong alias.
  • 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