cargo clippy --message-format=json --help

Checks a package to catch common mistakes and improve your Rust code.

Usage:
    cargo clippy [OPTIONS] [--] [<ARGS>...]

Common options:
    --no-deps                Run Clippy only on the given crate, without linting the dependencies
    --fix                    Automatically apply lint suggestions. This flag implies --no-deps and --all-targets
    -h, --help               Print this message
    -V, --version            Print version info and exit
    --explain [LINT]         Print the documentation for a given lint

See all options with cargo check --help.

Allowing / Denying lints

To allow or deny a lint from the command line you can use cargo clippy -- with:

    -W / --warn [LINT]       Set lint warnings
    -A / --allow [LINT]      Set lint allowed
    -D / --deny [LINT]       Set lint denied
    -F / --forbid [LINT]     Set lint forbidden

You can use tool lints to allow or deny lints from your code, e.g.:

    #[allow(clippy::needless_lifetimes)]

Manifest Options:
    --manifest-path <PATH>  Path to Cargo.toml
    --frozen                Require Cargo.lock and cache are up to date
    --locked                Require Cargo.lock is up to date
    --offline               Run without accessing the network

