Skip to content

Commit 39591df

Browse files
authored
Pipe the '--stats' flag through for the 'doc sdk' task (#3791)
1 parent 6b2ee57 commit 39591df

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tool/task.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ Future<void> runDoc(ArgResults commandResults) async {
299299
'flutter' => docFlutter(withStats: stats),
300300
'help' => _docHelp(),
301301
'package' => _docPackage(commandResults, withStats: stats),
302-
'sdk' => docSdk(),
302+
'sdk' => docSdk(withStats: stats),
303303
'testing-package' => docTestingPackage(),
304304
_ => throw UnimplementedError('Unknown doc target: "$target"'),
305305
};
@@ -462,9 +462,10 @@ Future<String> docPackage({
462462
return path.join(pubPackageDir.absolute.path, 'doc', 'api');
463463
}
464464

465-
Future<void> docSdk() async => _docSdk(
465+
Future<void> docSdk({bool withStats = false}) async => _docSdk(
466466
sdkDocsPath: _sdkDocsDir.path,
467467
dartdocPath: Directory.current.path,
468+
withStats: withStats,
468469
);
469470

470471
/// Creates a throwaway pub cache and returns the environment variables
@@ -547,6 +548,7 @@ Future<void> compareSdkWarnings() async {
547548
Future<Iterable<Map<String, Object?>>> _docSdk({
548549
required String sdkDocsPath,
549550
required String dartdocPath,
551+
bool withStats = false,
550552
}) async {
551553
var launcher = SubprocessLauncher('build-sdk-docs');
552554
await launcher
@@ -570,6 +572,7 @@ Future<Iterable<Map<String, Object?>>> _docSdk({
570572
'lib/resources/blank.txt',
571573
],
572574
workingDirectory: dartdocPath,
575+
withStats: withStats,
573576
);
574577
}
575578

0 commit comments

Comments
 (0)