@@ -5,13 +5,35 @@ use cargo::ops;
5
5
pub fn cli ( ) -> Command {
6
6
subcommand ( "fix" )
7
7
. about ( "Automatically fix lint warnings reported by rustc" )
8
+ . arg ( flag ( "edition" , "Fix in preparation for the next edition" ) )
9
+ . arg ( flag (
10
+ "edition-idioms" ,
11
+ "Fix warnings to migrate to the idioms of an edition" ,
12
+ ) )
13
+ . arg ( flag (
14
+ "broken-code" ,
15
+ "Fix code even if it already has compiler errors" ,
16
+ ) )
17
+ . arg ( flag (
18
+ "allow-no-vcs" ,
19
+ "Fix code even if a VCS was not detected" ,
20
+ ) )
21
+ . arg ( flag (
22
+ "allow-dirty" ,
23
+ "Fix code even if the working directory is dirty" ,
24
+ ) )
25
+ . arg ( flag (
26
+ "allow-staged" ,
27
+ "Fix code even if the working directory has staged changes" ,
28
+ ) )
29
+ . arg_ignore_rust_version ( )
30
+ . arg_message_format ( )
8
31
. arg_quiet ( )
9
32
. arg_package_spec (
10
33
"Package(s) to fix" ,
11
34
"Fix all packages in the workspace" ,
12
35
"Exclude packages from the fixes" ,
13
36
)
14
- . arg_jobs ( )
15
37
. arg_targets_all (
16
38
"Fix only this package's library" ,
17
39
"Fix only the specified binary" ,
@@ -24,36 +46,14 @@ pub fn cli() -> Command {
24
46
"Fix all benches" ,
25
47
"Fix all targets (default)" ,
26
48
)
49
+ . arg_features ( )
50
+ . arg_jobs ( )
27
51
. arg_release ( "Fix artifacts in release mode, with optimizations" )
28
52
. arg_profile ( "Build artifacts with the specified profile" )
29
- . arg_features ( )
30
53
. arg_target_triple ( "Fix for the target triple" )
31
54
. arg_target_dir ( )
32
- . arg_manifest_path ( )
33
- . arg_message_format ( )
34
- . arg ( flag (
35
- "broken-code" ,
36
- "Fix code even if it already has compiler errors" ,
37
- ) )
38
- . arg ( flag ( "edition" , "Fix in preparation for the next edition" ) )
39
- . arg ( flag (
40
- "edition-idioms" ,
41
- "Fix warnings to migrate to the idioms of an edition" ,
42
- ) )
43
- . arg ( flag (
44
- "allow-no-vcs" ,
45
- "Fix code even if a VCS was not detected" ,
46
- ) )
47
- . arg ( flag (
48
- "allow-dirty" ,
49
- "Fix code even if the working directory is dirty" ,
50
- ) )
51
- . arg ( flag (
52
- "allow-staged" ,
53
- "Fix code even if the working directory has staged changes" ,
54
- ) )
55
- . arg_ignore_rust_version ( )
56
55
. arg_timings ( )
56
+ . arg_manifest_path ( )
57
57
. after_help ( "Run `cargo help fix` for more detailed information.\n " )
58
58
}
59
59
0 commit comments