mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-08-12 15:55:43 +02:00
cargo*: add option placeholders and fix some syntax (#17270)
Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>
This commit is contained in:
parent
701b0ab50e
commit
d0a4ac3bc4
10 changed files with 17 additions and 17 deletions
|
@ -13,7 +13,7 @@
|
|||
|
||||
- Add a dependency and enable one or more specific features:
|
||||
|
||||
`cargo add {{dependency}} --features {{feature_1}},{{feature_2}}`
|
||||
`cargo add {{dependency}} {{[-F|--features]}} {{feature_1}},{{feature_2}}`
|
||||
|
||||
- Add an optional dependency, which then gets exposed as a feature of the crate:
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
- Remove release artifacts (the `target/release` directory):
|
||||
|
||||
`cargo clean --release`
|
||||
`cargo clean {{[-r|--release]}}`
|
||||
|
||||
- Remove artifacts in the directory of the given profile (in this case, `target/debug`):
|
||||
|
||||
|
|
|
@ -21,15 +21,15 @@
|
|||
|
||||
- Run checks for a lint group (see <https://rust-lang.github.io/rust-clippy/stable/index.html#?groups=cargo,complexity,correctness,deprecated,nursery,pedantic,perf,restriction,style,suspicious>):
|
||||
|
||||
`cargo clippy -- --warn clippy::{{lint_group}}`
|
||||
`cargo clippy -- {{[-W|--warn]}} clippy::{{lint_group}}`
|
||||
|
||||
- Treat warnings as errors:
|
||||
|
||||
`cargo clippy -- --deny warnings`
|
||||
`cargo clippy -- {{[-D|--deny]}} warnings`
|
||||
|
||||
- Run checks and ignore warnings:
|
||||
|
||||
`cargo clippy -- --allow warnings`
|
||||
`cargo clippy -- {{[-A|--allow]}} warnings`
|
||||
|
||||
- Apply Clippy suggestions automatically:
|
||||
|
||||
|
|
|
@ -5,15 +5,15 @@
|
|||
|
||||
- Invite the given user or team as an owner:
|
||||
|
||||
`cargo owner --add {{username|github:org_name:team_name}} {{crate}}`
|
||||
`cargo owner {{[-a|--add]}} {{username|github:org_name:team_name}} {{crate}}`
|
||||
|
||||
- Remove the given user or team as an owner:
|
||||
|
||||
`cargo owner --remove {{username|github:org_name:team_name}} {{crate}}`
|
||||
`cargo owner {{[-r|--remove]}} {{username|github:org_name:team_name}} {{crate}}`
|
||||
|
||||
- List owners of a crate:
|
||||
|
||||
`cargo owner --list {{crate}}`
|
||||
`cargo owner {{[-l|--list]}} {{crate}}`
|
||||
|
||||
- Use the specified registry (registry names can be defined in the configuration - the default is <https://crates.io>):
|
||||
|
||||
|
|
|
@ -10,4 +10,4 @@
|
|||
|
||||
- Display what files would be included in the tarball without actually creating it:
|
||||
|
||||
`cargo package --list`
|
||||
`cargo package {{[-l|--list]}}`
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
- Perform checks, create a `.crate` file but don't upload it (equivalent of `cargo package`):
|
||||
|
||||
`cargo publish --dry-run`
|
||||
`cargo publish {{[-n|--dry-run]}}`
|
||||
|
||||
- Use the specified registry (registry names can be defined in the configuration - the default is <https://crates.io>):
|
||||
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
> Display various kinds of reports.
|
||||
> More information: <https://doc.rust-lang.org/cargo/commands/cargo-report.html>.
|
||||
|
||||
- Display a report:
|
||||
- Display a report of crates which will eventually stop compiling:
|
||||
|
||||
`cargo report {{future-incompatibilities|...}}`
|
||||
`cargo report future-incompatibilities`
|
||||
|
||||
- Display a report with the specified Cargo-generated ID:
|
||||
|
||||
`cargo report {{future-incompatibilities|...}} --id {{id}}`
|
||||
`cargo report future-incompatibilities --id {{id}}`
|
||||
|
||||
- Display a report for the specified package:
|
||||
|
||||
`cargo report {{future-incompatibilities|...}} --package {{package}}`
|
||||
`cargo report future-incompatibilities {{[-p|--package]}} {{package}}`
|
||||
|
|
|
@ -22,4 +22,4 @@
|
|||
|
||||
- Only show normal/build/development dependencies:
|
||||
|
||||
`cargo tree --edges {{normal|build|dev}}`
|
||||
`cargo tree {{[-e|--edges]}} {{normal|build|dev}}`
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
- Display what would be updated, but don't actually write the lockfile:
|
||||
|
||||
`cargo update --dry-run`
|
||||
`cargo update {{[-n|--dry-run]}}`
|
||||
|
||||
- Update only the specified dependencies:
|
||||
|
||||
|
|
|
@ -9,4 +9,4 @@
|
|||
|
||||
- Display additional build information:
|
||||
|
||||
`cargo version --verbose`
|
||||
`cargo version {{[-v|--verbose]}}`
|
||||
|
|
Loading…
Add table
Reference in a new issue