mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-24 22:15:26 +02:00
cargo-fix: add page (#10774)
Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>
This commit is contained in:
parent
d845efb686
commit
96fec4b355
1 changed files with 36 additions and 0 deletions
36
pages/common/cargo-fix.md
Normal file
36
pages/common/cargo-fix.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
# cargo fix
|
||||
|
||||
> Automatically fix lint warnings reported by `rustc`.
|
||||
> More information: <https://doc.rust-lang.org/cargo/commands/cargo-fix.html>.
|
||||
|
||||
- Fix code even if it already has compiler errors:
|
||||
|
||||
`cargo fix --broken-code`
|
||||
|
||||
- Fix code even if the working directory has changes:
|
||||
|
||||
`cargo fix --allow-dirty`
|
||||
|
||||
- Fix the package’s library:
|
||||
|
||||
`cargo fix --lib`
|
||||
|
||||
- Fix the specified integration test:
|
||||
|
||||
`cargo fix --test {{name}}`
|
||||
|
||||
- Fix all members in the workspace:
|
||||
|
||||
`cargo fix --workspace`
|
||||
|
||||
- Set the directory for all generated artifacts and intermediate files:
|
||||
|
||||
`cargo fix --target-dir {{path/to/directory}}`
|
||||
|
||||
- Restrict Cargo from access to network for any reason:
|
||||
|
||||
`cargo fix --offline`
|
||||
|
||||
- Run `n` jobs in parallel (default: number of logical CPUs):
|
||||
|
||||
`cargo fix --jobs {{n}}`
|
Loading…
Add table
Reference in a new issue