2023-09-24 17:26:30 +02:00
|
|
|
# cargo check
|
|
|
|
|
|
|
|
> Check a local package and all of its dependencies for errors.
|
|
|
|
> More information: <https://doc.rust-lang.org/cargo/commands/cargo-check.html>.
|
|
|
|
|
|
|
|
- Check the current package:
|
|
|
|
|
2025-03-15 21:28:32 +00:00
|
|
|
`cargo {{[c|check]}}`
|
2023-09-24 17:26:30 +02:00
|
|
|
|
|
|
|
- Check all tests:
|
|
|
|
|
2025-03-15 21:28:32 +00:00
|
|
|
`cargo {{[c|check]}} --tests`
|
2023-09-24 17:26:30 +02:00
|
|
|
|
|
|
|
- Check the integration tests in `tests/integration_test1.rs`:
|
|
|
|
|
2025-03-15 21:28:32 +00:00
|
|
|
`cargo {{[c|check]}} --test {{integration_test1}}`
|
2023-09-24 17:26:30 +02:00
|
|
|
|
|
|
|
- Check the current package with the features `feature1` and `feature2`:
|
|
|
|
|
2025-03-15 21:28:32 +00:00
|
|
|
`cargo {{[c|check]}} {{[-F|--features]}} {{feature1,feature2}}`
|
2023-09-24 17:26:30 +02:00
|
|
|
|
|
|
|
- Check the current package with default features disabled:
|
|
|
|
|
2025-03-15 21:28:32 +00:00
|
|
|
`cargo {{[c|check]}} --no-default-features`
|