Index: pkg/testing/lib/src/analyze.dart |
diff --git a/pkg/testing/lib/src/analyze.dart b/pkg/testing/lib/src/analyze.dart |
index 85e4dcc6a46528ccaf974839bb86d9275f2664f9..ae689c8cf2ee4b167063f85169b7ca67473d4a6e 100644 |
--- a/pkg/testing/lib/src/analyze.dart |
+++ b/pkg/testing/lib/src/analyze.dart |
@@ -166,8 +166,10 @@ Future<Null> analyzeUris(Uri analysisOptions, Uri packages, List<Uri> uris, |
bool hasOutput = false; |
Set<String> seen = new Set<String>(); |
for (AnalyzerDiagnostic diagnostic in diagnostics) { |
- String path = diagnostic.uri.path; |
- if (exclude.any((RegExp r) => path.contains(r))) continue; |
+ String path = diagnostic.uri?.path; |
+ if (path != null && exclude.any((RegExp r) => path.contains(r))) { |
+ continue; |
+ } |
String message = "$diagnostic"; |
if (seen.add(message)) { |
hasOutput = true; |