Skip to content

Commit e8adba9

Browse files
committed
Auto merge of #14669 - weihanglo:docs-external-commands, r=epage
docs: document official external commands ### What does this PR try to resolve? This documents external commands that are distributed along with the Rust toolchain, including * `cargo-clippy` * `cargo-fmt` * `cargo-miri` The purpose of this is increasing the visibility of these tools, and redirecting people to the correct place to discuss and learn them. Fixes #14640
2 parents 1e5bad3 + 21dacad commit e8adba9

File tree

6 files changed

+80
-3
lines changed

6 files changed

+80
-3
lines changed

.ignore

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,14 @@
22
#
33
# The goal is to help people find the right file to edit
44
src/doc/man/generated_txt
5-
src/doc/src/commands
5+
src/doc/src/commands/*
66
src/etc/man
7+
!src/doc/src/commands/build-commands.md
8+
!src/doc/src/commands/cargo-clippy.md
9+
!src/doc/src/commands/cargo-fmt.md
10+
!src/doc/src/commands/cargo-miri.md
11+
!src/doc/src/commands/general-commands.md
12+
!src/doc/src/commands/index.md
13+
!src/doc/src/commands/manifest-commands.md
14+
!src/doc/src/commands/package-commands.md
15+
!src/doc/src/commands/publishg-commands.md

src/doc/src/SUMMARY.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,17 @@
5959
* [cargo build](commands/cargo-build.md)
6060
* [cargo check](commands/cargo-check.md)
6161
* [cargo clean](commands/cargo-clean.md)
62+
* [cargo clippy](commands/cargo-clippy.md)
6263
* [cargo doc](commands/cargo-doc.md)
6364
* [cargo fetch](commands/cargo-fetch.md)
6465
* [cargo fix](commands/cargo-fix.md)
66+
* [cargo fmt](commands/cargo-fmt.md)
67+
* [cargo miri](commands/cargo-miri.md)
68+
* [cargo report](commands/cargo-report.md)
6569
* [cargo run](commands/cargo-run.md)
6670
* [cargo rustc](commands/cargo-rustc.md)
6771
* [cargo rustdoc](commands/cargo-rustdoc.md)
6872
* [cargo test](commands/cargo-test.md)
69-
* [cargo report](commands/cargo-report.md)
7073
* [Manifest Commands](commands/manifest-commands.md)
7174
* [cargo add](commands/cargo-add.md)
7275
* [cargo generate-lockfile](commands/cargo-generate-lockfile.md)

src/doc/src/commands/build-commands.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
* [cargo build](cargo-build.md)
44
* [cargo check](cargo-check.md)
55
* [cargo clean](cargo-clean.md)
6+
* [cargo clippy](cargo-clippy.md)
67
* [cargo doc](cargo-doc.md)
78
* [cargo fetch](cargo-fetch.md)
89
* [cargo fix](cargo-fix.md)
10+
* [cargo fmt](cargo-fmt.md)
11+
* [cargo miri](cargo-miri.md)
12+
* [cargo report](cargo-report.md)
913
* [cargo run](cargo-run.md)
1014
* [cargo rustc](cargo-rustc.md)
1115
* [cargo rustdoc](cargo-rustdoc.md)
1216
* [cargo test](cargo-test.md)
13-
* [cargo report](cargo-report.md)

src/doc/src/commands/cargo-clippy.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# cargo-clippy(1)
2+
3+
## NAME
4+
5+
cargo-miri --- Checks a package to catch common mistakes and improve your Rust code
6+
7+
## DESCRIPTION
8+
9+
This is an external command distributed with the Rust toolchain as an optional component.
10+
It is not built into Cargo, and may require additional installation.
11+
12+
For information about usage and installation,
13+
see [Clippy Documentation](../../clippy/index.html).
14+
15+
## SEE ALSO
16+
17+
[cargo(1)](cargo.md),
18+
[cargo-fix(1)](cargo-fix.md),
19+
[cargo-fmt(1)](cargo-fmt.md),
20+
[Custom subcommands](../reference/external-tools.md#custom-subcommands)

src/doc/src/commands/cargo-fmt.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# cargo-fmt(1)
2+
3+
## NAME
4+
5+
carog-fmt --- Formats all bin and lib files of the current crate using rustfmt
6+
7+
## DESCRIPTION
8+
9+
This is an external command distributed with the Rust toolchain as an optional component.
10+
It is not built into Cargo, and may require additional installation.
11+
12+
For information about usage and installation,
13+
see <https://github.com/rust-lang/rustfmt>.
14+
15+
## SEE ALSO
16+
17+
[cargo(1)](cargo.md),
18+
[cargo-fix(1)](cargo-fix.md),
19+
[cargo-clippy(1)](cargo-clippy.md),
20+
[Custom subcommands](../reference/external-tools.md#custom-subcommands)

src/doc/src/commands/cargo-miri.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# cargo-miri(1)
2+
3+
## NAME
4+
5+
cargo-miri --- Runs binary crates and tests in Miri
6+
7+
## DESCRIPTION
8+
9+
This is an external command distributed with the Rust toolchain as an optional component.
10+
It is not built into Cargo, and may require additional installation.
11+
12+
This command is only available on the [nightly](https://doc.rust-lang.org/book/appendix-07-nightly-rust.html) channel.
13+
14+
For information about usage and installation,
15+
see <https://github.com/rust-lang/miri>.
16+
17+
## SEE ALSO
18+
19+
[cargo(1)](cargo.md),
20+
[cargo-run(1)](cargo-run.md),
21+
[cargo-test(1)](cargo-test.md),
22+
[Custom subcommands](../reference/external-tools.md#custom-subcommands)

0 commit comments

Comments
 (0)