Skip to content

Commit 385703f

Browse files
chore: improve cargo make with strict by default and better help (#98)
2 parents 0415f74 + 41324d3 commit 385703f

File tree

1 file changed

+51
-49
lines changed

1 file changed

+51
-49
lines changed

Makefile.toml

Lines changed: 51 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
[env]
22
CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
33

4-
[tasks.verify-strict]
5-
description = "Run all verification tasks with strict warning settings"
4+
[tasks.verify]
5+
description = "Run most verification tasks"
66
workspace = false
77
dependencies = [
8-
"run-all-tests",
9-
"lint-strict",
10-
"docs-strict",
8+
"run-tests",
9+
"lint",
10+
"docs",
1111
"spell-check",
1212
"verify-doc-tests",
1313
"verify-formatting",
1414
"deny",
1515
]
1616

17-
[tasks.verify]
18-
description = "Run most verification tasks"
17+
[tasks.verify-all]
18+
description = "Run all verification tasks"
1919
workspace = false
2020
dependencies = [
21-
"run-tests",
21+
"run-all-tests",
2222
"lint",
2323
"docs",
2424
"spell-check",
@@ -48,22 +48,6 @@ args = [
4848
]
4949
install_crate = "cargo-nextest"
5050

51-
[tasks.lint]
52-
workspace = false
53-
command = "cargo"
54-
args = ["clippy", "--workspace", "--tests", "--benches", "--all-features"]
55-
56-
[tasks.docs]
57-
workspace = false
58-
command = "cargo"
59-
args = [
60-
"doc",
61-
"--workspace",
62-
"--no-deps",
63-
"--all-features",
64-
"--document-private-items",
65-
]
66-
6751
[tasks.deny]
6852
workspace = false
6953
command = "cargo"
@@ -85,7 +69,7 @@ workspace = false
8569
command = "cargo"
8670
args = ["fmt", "--check", "--all"]
8771

88-
[tasks.lint-strict]
72+
[tasks.lint]
8973
description = "Run Clippy with warnings treated as errors"
9074
workspace = false
9175
command = "cargo"
@@ -100,7 +84,7 @@ args = [
10084
"warnings",
10185
]
10286

103-
[tasks.docs-strict]
87+
[tasks.docs]
10488
description = "Generate documentation with warnings treated as errors"
10589
workspace = false
10690
command = "cargo"
@@ -261,27 +245,45 @@ description = "Display help information about available tasks"
261245
workspace = false
262246
script_runner = "@rust"
263247
script = '''
264-
println!("Available tasks:");
265-
println!("\nVerification Tasks:");
266-
println!(" verify - Run all standard verification tasks");
267-
println!(" verify-strict - Run all verification tasks with strict warning settings");
268-
println!(" test-wasm - Run all tests on a wasm build");
269-
270-
println!("\nWASM Build Tasks:");
271-
println!(" build-wasm-dev - Build WASM target (development version)");
272-
println!(" build-wasm-debug - Build WASM target (with debug information)");
273-
println!(" build-wasm-release - Build WASM target (release version)");
274-
println!(" (this will automatically setup a wasm build environment)");
275-
276-
println!("\nServer Tasks:");
277-
println!(" dev - Build development version and serve it");
278-
println!(" debug - Build debug version and serve it");
279-
println!(" release - Build release version and serve it");
280-
println!(" serve - Serve the last build");
281-
282-
println!("\nUsage:");
283-
println!(" cargo make <task-name>");
284-
println!("\nExample:");
285-
println!(" cargo make verify");
286-
println!(" cargo make dev");
248+
//! ```cargo
249+
//! [dependencies]
250+
//! colored = "2.0"
251+
//! ```
252+
use colored::*;
253+
254+
fn main() {
255+
println!("{}", "CADara Build System".bold().blue());
256+
println!("\n{}", "Usage:".bold());
257+
println!(" cargo make <task-name>\n");
258+
println!(" cargo make verify # Run verification suite");
259+
println!(" cargo make dev # Start WASM development server");
260+
println!(" cargo make test-wasm # Run WASM test suite");
261+
262+
println!("\n{}", "Note:".bold());
263+
println!(" All commands must be executed from the repository root directory\n");
264+
265+
println!("{}", "Primary Commands:".bold().green());
266+
println!(" verify - Run standard verification suite");
267+
println!(" verify-all - Run extended verification suite (including ignored tests)");
268+
println!(" dev - Start WASM server");
269+
println!(" debug - Start WASM server with debug symbols");
270+
println!(" release - Start WASM production server\n");
271+
272+
println!("{}", "Verification Tasks:".bold().yellow());
273+
println!(" run-tests - Run workspace tests (via nextest)");
274+
println!(" run-all-tests - Run all tests including ignored ones");
275+
println!(" lint - Run Clippy");
276+
println!(" docs - Generate documentation");
277+
println!(" spell-check - Check for typos in codebase");
278+
println!(" verify-doc-tests - Verify documentation examples");
279+
println!(" verify-formatting - Check code formatting");
280+
println!(" deny - Check dependencies compliance\n");
281+
282+
println!("{}", "WASM Operations:".bold().magenta());
283+
println!(" build-wasm-dev - Build WASM target (development)");
284+
println!(" build-wasm-debug - Build WASM target (with debug info)");
285+
println!(" build-wasm-release - Build WASM target (production)");
286+
println!(" test-wasm - Run WASM-specific tests");
287+
println!(" serve - Start local web server (port 8080)\n");
288+
}
287289
'''

0 commit comments

Comments
 (0)