@@ -37,13 +37,25 @@ mixin _AnalyzeMixin on _Melos {
3737 concurrency: concurrency,
3838 ).join (' ' );
3939 final useGroupBuffer = concurrency != 1 && packages.length != 1 ;
40+ final dartPackageCount = packages.where ((e) => ! e.isFlutterPackage).length;
41+ final flutterPackageCount =
42+ packages.where ((e) => e.isFlutterPackage).length;
4043
4144 logger.command ('melos analyze' , withDollarSign: true );
4245
43- logger
44- .child (targetStyle (analyzeArgsString))
45- .child ('$runningLabel (in ${packages .length } packages)' )
46- .newLine ();
46+ if (dartPackageCount > 0 ) {
47+ logger
48+ .child (targetStyle (analyzeArgsString))
49+ .child ('$runningLabel (in $dartPackageCount packages)' )
50+ .newLine ();
51+ }
52+
53+ if (flutterPackageCount > 0 ) {
54+ logger
55+ .child (targetStyle (analyzeArgsString.replaceFirst ('dart' , 'flutter' )))
56+ .child ('$runningLabel (in $flutterPackageCount packages)' )
57+ .newLine ();
58+ }
4759
4860 await pool.forEach <Package , void >(packages, (package) async {
4961 final group = useGroupBuffer ? package.name : null ;
@@ -55,6 +67,7 @@ mixin _AnalyzeMixin on _Melos {
5567 workspace,
5668 package,
5769 _getAnalyzeArgs (
70+ package: package,
5871 workspace: workspace,
5972 fatalInfos: fatalInfos,
6073 fatalWarnings: fatalWarnings,
@@ -101,6 +114,7 @@ mixin _AnalyzeMixin on _Melos {
101114 List <String > _getAnalyzeArgs ({
102115 required MelosWorkspace workspace,
103116 required bool fatalInfos,
117+ Package ? package,
104118 bool ? fatalWarnings,
105119 // Note: The `concurrency` argument is intentionally set to a default value
106120 // of 1 to prevent its direct use by the `startCommand` function. It is
@@ -110,7 +124,10 @@ mixin _AnalyzeMixin on _Melos {
110124 }) {
111125 final options = _getOptionsArgs (fatalInfos, fatalWarnings, concurrency);
112126 return < String > [
113- workspace.sdkTool ('dart' ),
127+ if (package? .isFlutterPackage ?? false )
128+ workspace.sdkTool ('flutter' )
129+ else
130+ workspace.sdkTool ('dart' ),
114131 'analyze' ,
115132 options,
116133 ];
0 commit comments