swarm repositories / source
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormain <main@swarm.moe>2026-04-04 21:50:22 -0400
committermain <main@swarm.moe>2026-04-04 21:50:22 -0400
commit8048d67e5917b771be9aa819094aebf3936d0e98 (patch)
tree467090c90a5f263088a1de701095a040c66733ff
parent4053cb24991c406e53dd04a015ba5dd44c6620f3 (diff)
downloadrust_starter-8048d67e5917b771be9aa819094aebf3936d0e98.zip
docs: manifest-own warning fatality
-rw-r--r--docs/bootstrap-fresh.md1
-rw-r--r--docs/bootstrap-retrofit.md3
-rw-r--r--docs/rust-linting-proposal.md5
-rw-r--r--template/fresh/Cargo.toml4
4 files changed, 10 insertions, 3 deletions
diff --git a/docs/bootstrap-fresh.md b/docs/bootstrap-fresh.md
index f77b819..89bf757 100644
--- a/docs/bootstrap-fresh.md
+++ b/docs/bootstrap-fresh.md
@@ -116,6 +116,7 @@ The template only installs the fast gate. Add the deeper posture when the repo i
## Acceptance Checklist
- root `Cargo.toml` contains `[workspace.lints.rust]`, `[workspace.lints.rustdoc]`, and `[workspace.lints.clippy]`
+- root `Cargo.toml` owns warning-fatality policy, e.g. `warnings = "deny"` under `[workspace.lints.rust]`, rather than hiding it in runner flags
- root `Cargo.toml` contains canonical command vectors in `[workspace.metadata.rust-starter]`
- root `Cargo.toml` contains an ordered `canonicalize_commands` pipeline in `[workspace.metadata.rust-starter]`
- root `Cargo.toml` contains `[workspace.metadata.rust-starter.source_files]` with an intentional `max_lines` value
diff --git a/docs/bootstrap-retrofit.md b/docs/bootstrap-retrofit.md
index c07be56..a2910ce 100644
--- a/docs/bootstrap-retrofit.md
+++ b/docs/bootstrap-retrofit.md
@@ -96,6 +96,9 @@ Add `[lints] workspace = true` to every member crate.
Take inline `cargo clippy -- -A/-D ...` tails from scripts and CI, and migrate them into the root manifest in grouped, commented form.
+That includes `-D warnings`: if warnings are meant to be fatal, encode that as
+`warnings = "deny"` under `[workspace.lints.rust]` instead of leaving it as a command-line tail.
+
### 5. Tighten local suppression discipline
Prefer:
diff --git a/docs/rust-linting-proposal.md b/docs/rust-linting-proposal.md
index 53b9ae2..88e5612 100644
--- a/docs/rust-linting-proposal.md
+++ b/docs/rust-linting-proposal.md
@@ -22,6 +22,10 @@ One extra local fact matters: there is effectively no checked-in Rust CI posture
One more distinction matters: Clippy’s `too_many_lines` is about function bodies, not whole source files. If the goal is to force large modules to split, the starter pack needs an explicit file-level check instead of pretending the existing lint already covers it.
+One more ratchet should be explicit: if the repo wants warnings to be fatal, that belongs in
+`[workspace.lints.rust]` as `warnings = "deny"`, not in runner-side `cargo clippy -- -D warnings`
+tails. The manifest owns policy; the runner merely executes it.
+
## Local Survey
### The old shape
@@ -194,6 +198,7 @@ rust-version = "1.xx"
version = "0.1.0"
[workspace.lints.rust]
+warnings = "deny"
elided_lifetimes_in_paths = "deny"
unexpected_cfgs = "deny"
unsafe_code = "deny"
diff --git a/template/fresh/Cargo.toml b/template/fresh/Cargo.toml
index 4c6b49f..41a5c1a 100644
--- a/template/fresh/Cargo.toml
+++ b/template/fresh/Cargo.toml
@@ -11,6 +11,7 @@ rust-version = "1.90"
version = "0.1.0"
[workspace.lints.rust]
+warnings = "deny"
elided_lifetimes_in_paths = "deny"
unexpected_cfgs = "deny"
unsafe_code = "deny"
@@ -81,9 +82,6 @@ clippy_command = [
"--workspace",
"--all-targets",
"--all-features",
- "--",
- "-D",
- "warnings",
]
test_command = ["cargo", "test", "--workspace", "--all-targets", "--all-features"]
doc_command = ["cargo", "doc", "--workspace", "--all-features", "--no-deps"]