We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8f56767 commit 805a0aeCopy full SHA for 805a0ae
tests/ui/suspicious_command_arg_space.rs
@@ -1,5 +1,10 @@
1
fn main() {
2
- std::process::Command::new("echo").arg("hello world").spawn().unwrap();
+ // Things it should warn about:
3
std::process::Command::new("echo").arg("-n hello").spawn().unwrap();
4
std::process::Command::new("cat").arg("--number file").spawn().unwrap();
5
+
6
+ // Things it should not warn about:
7
+ std::process::Command::new("echo").arg("hello world").spawn().unwrap();
8
+ std::process::Command::new("a").arg("--fmt=%a %b %c").spawn().unwrap();
9
+ std::process::Command::new("b").arg("-ldflags=-s -w").spawn().unwrap();
10
}
0 commit comments