Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce logging when documenting multiple packages #3522

Merged
merged 1 commit into from
Oct 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions lib/src/generator/generator_frontend.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ class GeneratorFrontEnd implements Generator {
packageGraph, packageGraph.defaultPackage);

var indexAccumulator = <Indexable>[];
var multiplePackages = packageGraph.localPackages.length > 1;
for (var package in packageGraph.localPackages) {
if (multiplePackages) {
logInfo('Generating docs for package ${package.name}...');
}
for (var category in filterNonDocumented(package.categories)) {
logInfo('Generating docs for category ${category.name} from '
'${category.package.fullyQualifiedName}...');
Expand All @@ -68,8 +72,10 @@ class GeneratorFrontEnd implements Generator {
}

for (var lib in filterNonDocumented(package.libraries)) {
logInfo('Generating docs for library ${lib.name} from '
'${lib.element.source.uri}...');
if (!multiplePackages) {
logInfo('Generating docs for library ${lib.name} from '
'${lib.element.source.uri}...');
}
if (!lib.isAnonymous && !lib.hasDocumentation) {
packageGraph.warnOnElement(lib, PackageWarning.noLibraryLevelDocs);
}
Expand Down