File tree Expand file tree Collapse file tree 2 files changed +32
-1
lines changed Expand file tree Collapse file tree 2 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,10 @@ mixin _AnalyzeMixin on _Melos {
110110 }) {
111111 final options = _getOptionsArgs (fatalInfos, fatalWarnings, concurrency);
112112 return < String > [
113- workspace.sdkTool ('dart' ),
113+ if (workspace.isFlutterWorkspace)
114+ workspace.sdkTool ('flutter' )
115+ else
116+ workspace.sdkTool ('dart' ),
114117 'analyze' ,
115118 options,
116119 ];
Original file line number Diff line number Diff line change @@ -277,6 +277,34 @@ $ melos analyze
277277 expect (regex.hasMatch (logger.output.normalizeNewLines ()), isTrue);
278278 });
279279
280+ test ('should run analysis with using flutter' , () async {
281+ final workspaceDir = await createTemporaryWorkspace ();
282+
283+ await createProject (
284+ workspaceDir,
285+ PubSpec (
286+ name: 'a' ,
287+ dependencies: {
288+ 'c' : HostedReference (VersionConstraint .any),
289+ 'flutter' : const SdkReference ('flutter' ),
290+ },
291+ ),
292+ );
293+
294+ final config = await MelosWorkspaceConfig .fromWorkspaceRoot (workspaceDir);
295+
296+ final melos = Melos (
297+ logger: logger,
298+ config: config,
299+ );
300+ await melos.analyze (concurrency: 2 );
301+
302+ final regex =
303+ RegExp (r'\$ melos analyze\s+└> flutter analyze --concurrency 2' );
304+
305+ expect (regex.hasMatch (logger.output.normalizeNewLines ()), isTrue);
306+ });
307+
280308 test ('should run analysis with --concurrency 2 flag' , () async {
281309 await melos.analyze (concurrency: 2 );
282310
You can’t perform that action at this time.
0 commit comments