| 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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 } | 581 } |
| 582 return errorSeverity; | 582 return errorSeverity; |
| 583 } | 583 } |
| 584 | 584 |
| 585 void _setupEnv(CommandLineOptions options) { | 585 void _setupEnv(CommandLineOptions options) { |
| 586 // In batch mode, SDK is specified on the main command line rather than in | 586 // In batch mode, SDK is specified on the main command line rather than in |
| 587 // the command lines sent to stdin. So process it before deciding whether | 587 // the command lines sent to stdin. So process it before deciding whether |
| 588 // to activate batch mode. | 588 // to activate batch mode. |
| 589 if (sdk == null) { | 589 if (sdk == null) { |
| 590 sdk = new DirectoryBasedDartSdk(new JavaFile(options.dartSdkPath)); | 590 sdk = new DirectoryBasedDartSdk(new JavaFile(options.dartSdkPath)); |
| 591 sdk.useSummary = true; |
| 591 sdk.analysisOptions = createAnalysisOptionsForCommandLineOptions(options); | 592 sdk.analysisOptions = createAnalysisOptionsForCommandLineOptions(options); |
| 592 } | 593 } |
| 593 _isBatch = options.shouldBatch; | 594 _isBatch = options.shouldBatch; |
| 594 } | 595 } |
| 595 | 596 |
| 596 static AnalysisOptionsImpl createAnalysisOptionsForCommandLineOptions( | 597 static AnalysisOptionsImpl createAnalysisOptionsForCommandLineOptions( |
| 597 CommandLineOptions options) { | 598 CommandLineOptions options) { |
| 598 AnalysisOptionsImpl contextOptions = new AnalysisOptionsImpl(); | 599 AnalysisOptionsImpl contextOptions = new AnalysisOptionsImpl(); |
| 599 contextOptions.hint = !options.disableHints; | 600 contextOptions.hint = !options.disableHints; |
| 600 contextOptions.enableStrictCallChecks = options.enableStrictCallChecks; | 601 contextOptions.enableStrictCallChecks = options.enableStrictCallChecks; |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 777 for (var package in packages) { | 778 for (var package in packages) { |
| 778 var packageName = path.basename(package.path); | 779 var packageName = path.basename(package.path); |
| 779 var realPath = package.resolveSymbolicLinksSync(); | 780 var realPath = package.resolveSymbolicLinksSync(); |
| 780 result[packageName] = [ | 781 result[packageName] = [ |
| 781 PhysicalResourceProvider.INSTANCE.getFolder(realPath) | 782 PhysicalResourceProvider.INSTANCE.getFolder(realPath) |
| 782 ]; | 783 ]; |
| 783 } | 784 } |
| 784 return result; | 785 return result; |
| 785 } | 786 } |
| 786 } | 787 } |
| OLD | NEW |