4
4
5
5
use clap:: { Args , Parser , Subcommand } ;
6
6
use clippy_dev:: {
7
- deprecate_lint, dogfood, fmt, lint, new_lint, release, rename_lint, serve, setup, sync, update_lints, utils,
7
+ ClippyInfo , UpdateMode , deprecate_lint, dogfood, fmt, lint, new_lint, release, rename_lint, serve, setup, sync,
8
+ update_lints,
8
9
} ;
9
10
use std:: convert:: Infallible ;
10
11
use std:: env;
11
12
12
13
fn main ( ) {
13
14
let dev = Dev :: parse ( ) ;
14
- let clippy = utils :: ClippyInfo :: search_for_manifest ( ) ;
15
+ let clippy = ClippyInfo :: search_for_manifest ( ) ;
15
16
if let Err ( e) = env:: set_current_dir ( & clippy. path ) {
16
17
panic ! ( "error setting current directory to `{}`: {e}" , clippy. path. display( ) ) ;
17
18
}
@@ -26,16 +27,16 @@ fn main() {
26
27
allow_staged,
27
28
allow_no_vcs,
28
29
} => dogfood:: dogfood ( fix, allow_dirty, allow_staged, allow_no_vcs) ,
29
- DevCommand :: Fmt { check } => fmt:: run ( utils :: UpdateMode :: from_check ( check) ) ,
30
- DevCommand :: UpdateLints { check } => update_lints:: update ( utils :: UpdateMode :: from_check ( check) ) ,
30
+ DevCommand :: Fmt { check } => fmt:: run ( UpdateMode :: from_check ( check) ) ,
31
+ DevCommand :: UpdateLints { check } => update_lints:: update ( UpdateMode :: from_check ( check) ) ,
31
32
DevCommand :: NewLint {
32
33
pass,
33
34
name,
34
35
category,
35
36
r#type,
36
37
msrv,
37
38
} => match new_lint:: create ( clippy. version , pass, & name, & category, r#type. as_deref ( ) , msrv) {
38
- Ok ( ( ) ) => update_lints:: update ( utils :: UpdateMode :: Change ) ,
39
+ Ok ( ( ) ) => update_lints:: update ( UpdateMode :: Change ) ,
39
40
Err ( e) => eprintln ! ( "Unable to create lint: {e}" ) ,
40
41
} ,
41
42
DevCommand :: Setup ( SetupCommand { subcommand } ) => match subcommand {
0 commit comments