@@ -18,6 +18,7 @@ const pedanticOption = 'pedantic';
1818const previewDirOption = 'preview-dir' ;
1919const previewPortOption = 'preview-port' ;
2020const requiredOption = 'required' ;
21+ const sdkOption = 'sdk' ;
2122
2223const _binaryName = 'dartfix' ;
2324const _colorOption = 'color' ;
@@ -58,7 +59,7 @@ class Options {
5859 previewDir = results[previewDirOption] as String ,
5960 previewPort = results[previewPortOption] as String ,
6061 requiredFixes = results[requiredOption] as bool ,
61- sdkPath = _getSdkPath (),
62+ sdkPath = results[sdkOption] as String ?? _getSdkPath (),
6263 serverSnapshot = results[_serverSnapshot] as String ,
6364 showHelp = results[_helpOption] as bool || results.arguments.isEmpty,
6465 targets = results.rest,
@@ -102,6 +103,10 @@ class Options {
102103 help: 'Display this help message.' ,
103104 defaultsTo: false ,
104105 negatable: false )
106+ ..addOption (sdkOption,
107+ help: 'Path to the SDK to analyze against.' ,
108+ valueHelp: 'path' ,
109+ hide: true )
105110 ..addOption (_serverSnapshot,
106111 help: 'Path to the analysis server snapshot file.' ,
107112 valueHelp: 'path' ,
0 commit comments