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
<cyan,bold>cargo clippy test</> <cyan>[OPTIONS] [--] [<<ARGS>>...]</> for running `test` with Clippy as add-on
173
+
<cyan,bold>cargo clippy build</> <cyan>[OPTIONS] [--] [<<ARGS>>...]</> for running `build` with Clippy as add-on
157
174
158
175
<green,bold>Common options:</>
159
176
<cyan,bold>--no-deps</> Run Clippy only on the given crate, without linting the dependencies
160
-
<cyan,bold>--fix</> Automatically apply lint suggestions. This flag implies <cyan>--no-deps</> and <cyan>--all-targets</>
177
+
<cyan,bold>--fix</> Automatically apply lint suggestions. This flag implies <cyan>--no-deps</> and <cyan>--all-targets</> (not available on test/build)
161
178
<cyan,bold>-h</>, <cyan,bold>--help</> Print this message
162
179
<cyan,bold>-V</>, <cyan,bold>--version</> Print version info and exit
163
180
<cyan,bold>--explain [LINT]</> Print the documentation for a given lint
164
181
165
-
See all options with <cyan,bold>cargo check --help</>.
182
+
See all options with <cyan,bold>cargo check --help</> or <cyan,bold>cargo build/test --help</> for the build or test subcommands
166
183
167
184
<green,bold>Allowing / Denying lints</>
168
185
@@ -213,9 +230,17 @@ mod tests {
213
230
}
214
231
215
232
#[test]
216
-
fncheck(){
233
+
fncargo_subcommand(){
217
234
let args = "cargo clippy".split_whitespace().map(ToString::to_string);
218
235
let cmd = ClippyCmd::new(args);
219
236
assert_eq!("check", cmd.cargo_subcommand);
237
+
238
+
let args = "cargo clippy build".split_whitespace().map(ToString::to_string);
239
+
let cmd = ClippyCmd::new(args);
240
+
assert_eq!("build", cmd.cargo_subcommand);
241
+
242
+
let args = "cargo clippy test".split_whitespace().map(ToString::to_string);
0 commit comments