@@ -76,7 +76,8 @@ fn main() {
7676 } ,
7777 ( "lint" , Some ( matches) ) => {
7878 let path = matches. value_of ( "path" ) . unwrap ( ) ;
79- lint:: run ( path) ;
79+ let args = matches. values_of ( "args" ) . into_iter ( ) . flatten ( ) ;
80+ lint:: run ( path, args) ;
8081 } ,
8182 ( "rename_lint" , Some ( matches) ) => {
8283 let old_name = matches. value_of ( "old_name" ) . unwrap ( ) ;
@@ -123,7 +124,7 @@ fn get_clap_config<'a>() -> ArgMatches<'a> {
123124 * the lint count in README.md is correct\n \
124125 * the changelog contains markdown link references at the bottom\n \
125126 * all lint groups include the correct lints\n \
126- * lint modules in `clippy_lints/*` are visible in `src/lifb .rs` via `pub mod`\n \
127+ * lint modules in `clippy_lints/*` are visible in `src/lib .rs` via `pub mod`\n \
127128 * all lints are registered in the lint store",
128129 )
129130 . arg ( Arg :: with_name ( "print-only" ) . long ( "print-only" ) . help (
@@ -278,11 +279,44 @@ fn get_clap_config<'a>() -> ArgMatches<'a> {
278279 Lint a package directory:
279280 cargo dev lint tests/ui-cargo/wildcard_dependencies/fail
280281 cargo dev lint ~/my-project
282+
283+ Run rustfix:
284+ cargo dev lint ~/my-project -- --fix
285+
286+ Set lint levels:
287+ cargo dev lint file.rs -- -W clippy::pedantic
288+ cargo dev lint ~/my-project -- -- -W clippy::pedantic
281289 " } )
282290 . arg (
283291 Arg :: with_name ( "path" )
284292 . required ( true )
285293 . help ( "The path to a file or package directory to lint" ) ,
294+ )
295+ . arg (
296+ Arg :: with_name ( "args" )
297+ . multiple ( true )
298+ . help ( "Pass extra arguments to cargo/clippy-driver" ) ,
299+ ) ,
300+ )
301+ . subcommand (
302+ SubCommand :: with_name ( "rename_lint" )
303+ . about ( "Renames the given lint" )
304+ . arg (
305+ Arg :: with_name ( "old_name" )
306+ . index ( 1 )
307+ . required ( true )
308+ . help ( "The name of the lint to rename" ) ,
309+ )
310+ . arg (
311+ Arg :: with_name ( "new_name" )
312+ . index ( 2 )
313+ . required_unless ( "uplift" )
314+ . help ( "The new name of the lint" ) ,
315+ )
316+ . arg (
317+ Arg :: with_name ( "uplift" )
318+ . long ( "uplift" )
319+ . help ( "This lint will be uplifted into rustc" ) ,
286320 ) ,
287321 )
288322 . subcommand (
0 commit comments