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

Side by Side Diff: pkg/analyzer_cli/lib/src/driver.dart

Issue 1689263004: CLI. Always fully parse given target files. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analyzer_cli.src.driver; 5 library analyzer_cli.src.driver;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:io'; 9 import 'dart:io';
10 10
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 packagesRequiringFullParse = null; 283 packagesRequiringFullParse = null;
284 } else { 284 } else {
285 // We aren't showing warnings for dependent packages, but we may still 285 // We aren't showing warnings for dependent packages, but we may still
286 // need to show warnings for "self" packages, so we need to do a full 286 // need to show warnings for "self" packages, so we need to do a full
287 // parse in any package containing files mentioned on the command line. 287 // parse in any package containing files mentioned on the command line.
288 // TODO(paulberry): implement this. As a temporary workaround, we're 288 // TODO(paulberry): implement this. As a temporary workaround, we're
289 // fully parsing all packages. 289 // fully parsing all packages.
290 packagesRequiringFullParse = null; 290 packagesRequiringFullParse = null;
291 } 291 }
292 return (Source source) { 292 return (Source source) {
293 if (source.uri.scheme == 'dart') { 293 if (options.sourceFiles.contains(source.fullName)) {
294 return true;
295 } else if (source.uri.scheme == 'dart') {
294 return options.showSdkWarnings; 296 return options.showSdkWarnings;
295 } else if (source.uri.scheme == 'package') { 297 } else if (source.uri.scheme == 'package') {
296 if (packagesRequiringFullParse == null) { 298 if (packagesRequiringFullParse == null) {
297 return true; 299 return true;
298 } else if (source.uri.pathSegments.length == 0) { 300 } else if (source.uri.pathSegments.length == 0) {
299 // We should never see a URI like this, but fully parse it to be 301 // We should never see a URI like this, but fully parse it to be
300 // safe. 302 // safe.
301 return true; 303 return true;
302 } else { 304 } else {
303 return packagesRequiringFullParse 305 return packagesRequiringFullParse
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 for (var package in packages) { 710 for (var package in packages) {
709 var packageName = path.basename(package.path); 711 var packageName = path.basename(package.path);
710 var realPath = package.resolveSymbolicLinksSync(); 712 var realPath = package.resolveSymbolicLinksSync();
711 result[packageName] = [ 713 result[packageName] = [
712 PhysicalResourceProvider.INSTANCE.getFolder(realPath) 714 PhysicalResourceProvider.INSTANCE.getFolder(realPath)
713 ]; 715 ];
714 } 716 }
715 return result; 717 return result;
716 } 718 }
717 } 719 }
OLDNEW
« 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