← Rule catalog

Clippy · Correctness

Command argument with spaces meant as several

clippy::suspicious_command_arg_space

Pass each process argument separately instead of embedding spaces in one argument.

Category
Correctness
Default level
warn
Tier
P2
Producer
Clippy
Diff scope
line

Not a defect when

The argument is one value that legitimately contains a space, such as a file path, a commit message or a search phrase.

What it reads

Clippy, with the compiler behind it. The only pass that compiles.

Tier

Ordinary defect.

The tier bounds how severe a rule may be; its category bounds the tier.

Diff scope

The changed line itself.

What --scope contextual looks at to decide whether a change caused the finding.

Change it

Turn it off, or make it blocking, without touching the code it flags:

rust-doctor --rule clippy::suspicious_command_arg_space=off .
rust-doctor --rule clippy::suspicious_command_arg_space=error .

Set it once in rust-doctor.toml

Upstream

Clippy's own documentation for this lint

Other Correctness rules