Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(532)

Unified Diff: pkg/analyzer_cli/lib/src/driver.dart

Issue 2695863003: Fix for reporting not analyzed parts with the new analysis driver. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_cli/lib/src/driver.dart
diff --git a/pkg/analyzer_cli/lib/src/driver.dart b/pkg/analyzer_cli/lib/src/driver.dart
index e91d07ef262d6373d7af382528fca49a2114cbd7..067491fde610dc26c6e1269fe12c13bf61cd5b1d 100644
--- a/pkg/analyzer_cli/lib/src/driver.dart
+++ b/pkg/analyzer_cli/lib/src/driver.dart
@@ -244,10 +244,17 @@ class Driver implements CommandLineStarter {
// Check that each part has a corresponding source in the input list.
for (Source part in parts) {
bool found = false;
- for (var lib in context.getLibrariesContaining(part)) {
- if (libUris.contains(lib.uri)) {
+ if (analysisDriver != null) {
+ var partFile = analysisDriver.fsState.getFileForPath(part.fullName);
+ if (libUris.contains(partFile.library?.uri)) {
found = true;
}
+ } else {
+ for (var lib in context.getLibrariesContaining(part)) {
+ if (libUris.contains(lib.uri)) {
+ found = true;
+ }
+ }
}
if (!found) {
errorSink.writeln("${part.fullName} is a part and cannot be analyzed.");
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698