You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Emit a warning when an argument of the form "-x foo", "--abc bar", /X baz, or a concatenation of these is passed to std::process::Command::arg(...) and suggest to use either multiple arg calls or a single args call instead.
In these cases the programmer likely intended to pass multiple args to the process, and probably wants to use something like std::process::Command::args(["-x", "foo"]) instead.
Lint Name
possible_multiple_args_in_arg
Category
suspicious
Advantage
prevent unintended behavior when executing other processes with Command.
Drawbacks
This lint will by design always have some false-positives as Clippy can't be sure this isn't what you wanted to do.
What it does
Emit a warning when an argument of the form
"-x foo"
,"--abc bar"
,/X baz
, or a concatenation of these is passed to std::process::Command::arg(...) and suggest to use either multiplearg
calls or a singleargs
call instead.In these cases the programmer likely intended to pass multiple args to the process, and probably wants to use something like
std::process::Command::args(["-x", "foo"]
) instead.Lint Name
possible_multiple_args_in_arg
Category
suspicious
Advantage
Command
.Drawbacks
This lint will by design always have some false-positives as Clippy can't be sure this isn't what you wanted to do.
Example
Could be written as:
The text was updated successfully, but these errors were encountered: