Skip to content

Commit 4225a4f

Browse files
committed
Keep "xtask" as a top-level command
TC felt that it would be better to stay with a more conventional style to avoid confusion.
1 parent d5c1abd commit 4225a4f

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

.cargo/config.toml

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
[alias]
2-
style-check = "run --manifest-path=style-check/Cargo.toml -- src"
3-
linkcheck = "run --manifest-path=xtask/Cargo.toml -- linkcheck"
4-
test-all = "run --manifest-path=xtask/Cargo.toml -- test-all"
2+
xtask = "run --manifest-path=xtask/Cargo.toml"

docs/authoring.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ This document serves as a guide for editors and reviewers. Some conventions and
2828
```
2929
* See the [Conventions] section for formatting callouts such as notes, edition differences, and warnings.
3030

31-
There are automated checks for some of these rules. Run `cargo style-check` to run them locally.
31+
There are automated checks for some of these rules. Run `cargo xtask style-check` to run them locally.
3232

3333
[atx]: https://spec.commonmark.org/0.31.2/#atx-headings
3434
[conventions]: ../src/introduction.md#conventions
@@ -62,11 +62,11 @@ You can verify the samples pass by running `mdbook test`.
6262

6363
### Linkcheck
6464

65-
To verify that links are not broken, run `cargo linkcheck`.
65+
To verify that links are not broken, run `cargo xtask linkcheck`.
6666

6767
### Running all tests
6868

69-
As a last step before opening a PR, it is recommended to run `cargo test-all`. This will go through and run most of the tests that are required for CI to pass. See `xtask/src/main.rs` for what all this does.
69+
As a last step before opening a PR, it is recommended to run `cargo xtask test-all`. This will go through and run most of the tests that are required for CI to pass. See `xtask/src/main.rs` for what all this does.
7070

7171
## Special markdown constructs
7272

xtask/src/main.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@ fn main() -> Result<()> {
1717
eprintln!("all tests passed!");
1818
}
1919
Some("linkcheck") => linkcheck(args)?,
20+
Some("style-check") => style_check()?,
2021
Some(x) => {
2122
eprintln!("error: unknown command `{x}` (valid options: linkcheck)");
2223
exit(1);
2324
}
2425
None => {
25-
eprintln!("error: specify a command (valid options: linkcheck)");
26+
eprintln!("error: specify a command (valid options: linkcheck, style-check, test-all)");
2627
exit(1);
2728
}
2829
}

0 commit comments

Comments
 (0)