Index: pkg/compiler/lib/src/compiler.dart |
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart |
index fa655c520b7376ada4a16be08621aef639a50638..8a0e00267cf7965ba9abd9131aa3dd03c88dbf03 100644 |
--- a/pkg/compiler/lib/src/compiler.dart |
+++ b/pkg/compiler/lib/src/compiler.dart |
@@ -1664,7 +1664,7 @@ class _CompilerDiagnosticReporter extends DiagnosticReporter { |
void reportDiagnosticInternal(DiagnosticMessage message, |
List<DiagnosticMessage> infos, |
api.Diagnostic kind) { |
- if (!options.showPackageWarnings && |
+ if (!options.showAllPackageWarnings && |
message.spannable != NO_LOCATION_SPANNABLE) { |
switch (kind) { |
case api.Diagnostic.WARNING: |
@@ -1672,6 +1672,10 @@ class _CompilerDiagnosticReporter extends DiagnosticReporter { |
Element element = elementFromSpannable(message.spannable); |
if (!compiler.inUserCode(element, assumeInUserCode: true)) { |
Uri uri = compiler.getCanonicalUri(element); |
+ if (options.showPackageWarningsFor(uri)) { |
+ reportDiagnostic(message, infos, kind); |
+ return; |
+ } |
SuppressionInfo info = |
suppressedWarnings.putIfAbsent(uri, () => new SuppressionInfo()); |
if (kind == api.Diagnostic.WARNING) { |
@@ -1932,7 +1936,7 @@ class _CompilerDiagnosticReporter extends DiagnosticReporter { |
} |
void reportSuppressedMessagesSummary() { |
- if (!options.showPackageWarnings && !options.suppressWarnings) { |
+ if (!options.showAllPackageWarnings && !options.suppressWarnings) { |
suppressedWarnings.forEach((Uri uri, SuppressionInfo info) { |
MessageKind kind = MessageKind.HIDDEN_WARNINGS_HINTS; |
if (info.warnings == 0) { |