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 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 return errorSeverity; | 610 return errorSeverity; |
611 } | 611 } |
612 | 612 |
613 void _setupSdk(CommandLineOptions options, bool hasEmbedder) { | 613 void _setupSdk(CommandLineOptions options, bool hasEmbedder) { |
614 if (sdk == null) { | 614 if (sdk == null) { |
615 if (options.dartSdkSummaryPath != null) { | 615 if (options.dartSdkSummaryPath != null) { |
616 sdk = new SummaryBasedDartSdk( | 616 sdk = new SummaryBasedDartSdk( |
617 options.dartSdkSummaryPath, options.strongMode); | 617 options.dartSdkSummaryPath, options.strongMode); |
618 } else { | 618 } else { |
619 String dartSdkPath = options.dartSdkPath; | 619 String dartSdkPath = options.dartSdkPath; |
620 DirectoryBasedDartSdk directorySdk = | 620 DirectoryBasedDartSdk directorySdk = new DirectoryBasedDartSdk( |
621 new DirectoryBasedDartSdk(new JavaFile(dartSdkPath)); | 621 new JavaFile(dartSdkPath), options.strongMode); |
622 // Summaries are disabled in the presence of embedders. | 622 // Summaries are disabled in the presence of embedders. |
623 if (hasEmbedder) { | 623 if (hasEmbedder) { |
624 directorySdk.useSummary = false; | 624 directorySdk.useSummary = false; |
625 } else { | 625 } else { |
626 directorySdk.useSummary = | 626 directorySdk.useSummary = |
627 options.sourceFiles.every((String sourcePath) { | 627 options.sourceFiles.every((String sourcePath) { |
628 sourcePath = path.absolute(sourcePath); | 628 sourcePath = path.absolute(sourcePath); |
629 sourcePath = path.normalize(sourcePath); | 629 sourcePath = path.normalize(sourcePath); |
630 return !path.isWithin(dartSdkPath, sourcePath); | 630 return !path.isWithin(dartSdkPath, sourcePath); |
631 }); | 631 }); |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
830 for (var package in packages) { | 830 for (var package in packages) { |
831 var packageName = path.basename(package.path); | 831 var packageName = path.basename(package.path); |
832 var realPath = package.resolveSymbolicLinksSync(); | 832 var realPath = package.resolveSymbolicLinksSync(); |
833 result[packageName] = [ | 833 result[packageName] = [ |
834 PhysicalResourceProvider.INSTANCE.getFolder(realPath) | 834 PhysicalResourceProvider.INSTANCE.getFolder(realPath) |
835 ]; | 835 ]; |
836 } | 836 } |
837 return result; | 837 return result; |
838 } | 838 } |
839 } | 839 } |
OLD | NEW |