| OLD | NEW |
| 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 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 } | 580 } |
| 581 if (options.warningsAreFatal && errorSeverity == ErrorSeverity.WARNING) { | 581 if (options.warningsAreFatal && errorSeverity == ErrorSeverity.WARNING) { |
| 582 exitCode = errorSeverity.ordinal; | 582 exitCode = errorSeverity.ordinal; |
| 583 } | 583 } |
| 584 return errorSeverity; | 584 return errorSeverity; |
| 585 } | 585 } |
| 586 | 586 |
| 587 void _setupSdk(CommandLineOptions options) { | 587 void _setupSdk(CommandLineOptions options) { |
| 588 if (sdk == null) { | 588 if (sdk == null) { |
| 589 if (options.dartSdkSummaryPath != null) { | 589 if (options.dartSdkSummaryPath != null) { |
| 590 sdk = new SummaryBasedDartSdk(options.dartSdkSummaryPath); | 590 sdk = new SummaryBasedDartSdk( |
| 591 options.dartSdkSummaryPath, options.strongMode); |
| 591 } else { | 592 } else { |
| 592 String dartSdkPath = options.dartSdkPath; | 593 String dartSdkPath = options.dartSdkPath; |
| 593 DirectoryBasedDartSdk directorySdk = | 594 DirectoryBasedDartSdk directorySdk = |
| 594 new DirectoryBasedDartSdk(new JavaFile(dartSdkPath)); | 595 new DirectoryBasedDartSdk(new JavaFile(dartSdkPath)); |
| 595 directorySdk.useSummary = | 596 directorySdk.useSummary = |
| 596 options.sourceFiles.every((String sourcePath) { | 597 options.sourceFiles.every((String sourcePath) { |
| 597 sourcePath = path.absolute(sourcePath); | 598 sourcePath = path.absolute(sourcePath); |
| 598 sourcePath = path.normalize(sourcePath); | 599 sourcePath = path.normalize(sourcePath); |
| 599 return !path.isWithin(dartSdkPath, sourcePath); | 600 return !path.isWithin(dartSdkPath, sourcePath); |
| 600 }); | 601 }); |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 792 for (var package in packages) { | 793 for (var package in packages) { |
| 793 var packageName = path.basename(package.path); | 794 var packageName = path.basename(package.path); |
| 794 var realPath = package.resolveSymbolicLinksSync(); | 795 var realPath = package.resolveSymbolicLinksSync(); |
| 795 result[packageName] = [ | 796 result[packageName] = [ |
| 796 PhysicalResourceProvider.INSTANCE.getFolder(realPath) | 797 PhysicalResourceProvider.INSTANCE.getFolder(realPath) |
| 797 ]; | 798 ]; |
| 798 } | 799 } |
| 799 return result; | 800 return result; |
| 800 } | 801 } |
| 801 } | 802 } |
| OLD | NEW |