@@ -36,31 +36,37 @@ To use the tool, run either ['dart fix --dry-run'] for a preview of the proposed
36
36
late String argsTarget;
37
37
38
38
FixCommand ({bool verbose = false }) : super (cmdName, cmdDescription, verbose) {
39
- argParser.addFlag ('dry-run' ,
40
- abbr: 'n' ,
39
+ argParser
40
+ ..addFlag ('dry-run' ,
41
+ abbr: 'n' ,
42
+ defaultsTo: false ,
43
+ negatable: false ,
44
+ help: 'Preview the proposed changes but make no changes.' )
45
+ ..addFlag (
46
+ 'apply' ,
41
47
defaultsTo: false ,
42
48
negatable: false ,
43
- help: 'Preview the proposed changes but make no changes.' );
44
- argParser. addFlag (
45
- 'apply' ,
46
- defaultsTo : false ,
47
- negatable : false ,
48
- help : 'Apply the proposed changes .' ,
49
- );
50
- argParser. addMultiOption (
51
- 'code ' ,
52
- help : 'Apply fixes for one (or more) diagnostic codes.' ,
53
- valueHelp : 'code1,code2,...' ,
54
- );
55
- argParser. addFlag (
56
- 'compare-to-golden' ,
57
- defaultsTo : false ,
58
- negatable : false ,
59
- help :
60
- 'Compare the result of applying fixes to a golden file for testing. ' ,
61
- hide: ! verbose ,
62
- );
63
- argParser .addExperimentalFlags (verbose: verbose);
49
+ help: 'Apply the proposed changes.' ,
50
+ )
51
+ .. addMultiOption (
52
+ 'code' ,
53
+ help : 'Apply fixes for one (or more) diagnostic codes.' ,
54
+ valueHelp : 'code1,code2,.. .' ,
55
+ )
56
+ .. addFlag (
57
+ 'compare-to-golden ' ,
58
+ defaultsTo : false ,
59
+ negatable : false ,
60
+ help :
61
+ 'Compare the result of applying fixes to a golden file for testing.' ,
62
+ hide : ! verbose ,
63
+ )
64
+ .. addFlag (
65
+ useAotSnapshotFlag,
66
+ help : 'Use the AOT analysis server snapshot ' ,
67
+ hide: true ,
68
+ )
69
+ . .addExperimentalFlags (verbose: verbose);
64
70
}
65
71
66
72
@override
@@ -120,6 +126,7 @@ To use the tool, run either ['dart fix --dry-run'] for a preview of the proposed
120
126
argResults: argResults,
121
127
suppressAnalytics: suppressAnalytics,
122
128
enabledExperiments: args.enabledExperiments,
129
+ useAotSnapshot: args.flag (useAotSnapshotFlag),
123
130
);
124
131
125
132
await server.start (setAnalysisRoots: false );
0 commit comments