Problem
Finding cargo fmt and cargo clippy is not very discoverable. The places it's mentioned are in the appendices to The Book (which I don't think many people read): https://doc.rust-lang.org/book/appendix-04-useful-development-tools.html#automatic-formatting-with-rustfmt and on playground under 'tools'. It would be great to also suggest them with 'common cargo commands'.
Steps
cargo
Some common cargo commands are (see all commands with --list):
build, b Compile the current package
check, c Analyze the current package and report errors, but don't build object files
clean Remove the target directory
doc Build this package's and its dependencies' documentation
new Create a new cargo package
init Create a new cargo package in an existing directory
run, r Run a binary or example of the local package
test, t Run the tests
bench Run the benchmarks
update Update dependencies listed in Cargo.lock
search Search registry for crates
publish Package and upload this package to the registry
install Install a Rust binary. Default location is $HOME/.cargo/bin
uninstall Uninstall a Rust binary
Possible Solution(s)
Near doc, add
fmt Format every crate in this workspace
clippy Run a code linter to catch common bugs or Rust idioms
Notes
Output of cargo version: cargo 1.46.0 (149022b1d 2020-07-17)
Problem
Finding
cargo fmtandcargo clippyis not very discoverable. The places it's mentioned are in the appendices to The Book (which I don't think many people read): https://doc.rust-lang.org/book/appendix-04-useful-development-tools.html#automatic-formatting-with-rustfmt and on playground under 'tools'. It would be great to also suggest them with 'common cargo commands'.Steps
cargoPossible Solution(s)
Near
doc, addNotes
Output of
cargo version:cargo 1.46.0 (149022b1d 2020-07-17)