Skip to content

Commit

Permalink
make clear that the list under the missing exports are usages and onl…
Browse files Browse the repository at this point in the history
…y show the problematic ones
  • Loading branch information
devmil committed Apr 17, 2024
1 parent 0d5f660 commit 4cbc4d5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/src/cli/commands/extract_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,14 @@ If not specified the extracted API will be printed to the console.
for (final declaration in declarationsWithoutEntryPointsOutsideTests) {
stdout.writeln(' ${declaration.name}');
if (declaration is InterfaceDeclaration) {
for (final typeUsage in declaration.typeUsages) {
stdout.writeln(' - ${typeUsage.referringElementName}');
final filteredUsages = declaration.typeUsages
.where((tu) => !tu.isVisibleForTesting)
.toList();
if (filteredUsages.isNotEmpty) {
stdout.writeln(' Usage(s):');
for (final typeUsage in filteredUsages) {
stdout.writeln(' - ${typeUsage.referringElementName}');
}
}
}
}
Expand Down

0 comments on commit 4cbc4d5

Please sign in to comment.