@@ -5,13 +5,35 @@ use cargo::ops;
55pub fn cli ( ) -> Command {
66 subcommand ( "fix" )
77 . 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 ( )
831 . arg_quiet ( )
932 . arg_package_spec (
1033 "Package(s) to fix" ,
1134 "Fix all packages in the workspace" ,
1235 "Exclude packages from the fixes" ,
1336 )
14- . arg_jobs ( )
1537 . arg_targets_all (
1638 "Fix only this package's library" ,
1739 "Fix only the specified binary" ,
@@ -24,36 +46,14 @@ pub fn cli() -> Command {
2446 "Fix all benches" ,
2547 "Fix all targets (default)" ,
2648 )
49+ . arg_features ( )
50+ . arg_jobs ( )
2751 . arg_release ( "Fix artifacts in release mode, with optimizations" )
2852 . arg_profile ( "Build artifacts with the specified profile" )
29- . arg_features ( )
3053 . arg_target_triple ( "Fix for the target triple" )
3154 . 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 ( )
5655 . arg_timings ( )
56+ . arg_manifest_path ( )
5757 . after_help ( "Run `cargo help fix` for more detailed information.\n " )
5858}
5959
0 commit comments