| 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' as io; | 9 import 'dart:io' as io; |
| 10 | 10 |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 } else { | 223 } else { |
| 224 context.applyChanges(changeSet); | 224 context.applyChanges(changeSet); |
| 225 } | 225 } |
| 226 } | 226 } |
| 227 | 227 |
| 228 // Analyze the libraries. | 228 // Analyze the libraries. |
| 229 ErrorSeverity allResult = ErrorSeverity.NONE; | 229 ErrorSeverity allResult = ErrorSeverity.NONE; |
| 230 var libUris = <Uri>[]; | 230 var libUris = <Uri>[]; |
| 231 var parts = <Source>[]; | 231 var parts = <Source>[]; |
| 232 for (Source source in sourcesToAnalyze) { | 232 for (Source source in sourcesToAnalyze) { |
| 233 if (context.computeKindOf(source) == SourceKind.PART) { | 233 SourceKind sourceKind = analysisDriver != null |
| 234 ? await analysisDriver.getSourceKind(source.fullName) |
| 235 : context.computeKindOf(source); |
| 236 if (sourceKind == SourceKind.PART) { |
| 234 parts.add(source); | 237 parts.add(source); |
| 235 continue; | 238 continue; |
| 236 } | 239 } |
| 237 ErrorSeverity status = await _runAnalyzer(source, options); | 240 ErrorSeverity status = await _runAnalyzer(source, options); |
| 238 allResult = allResult.max(status); | 241 allResult = allResult.max(status); |
| 239 libUris.add(source.uri); | 242 libUris.add(source.uri); |
| 240 } | 243 } |
| 241 | 244 |
| 242 // Check that each part has a corresponding source in the input list. | 245 // Check that each part has a corresponding source in the input list. |
| 243 for (Source part in parts) { | 246 for (Source part in parts) { |
| (...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 913 for (var package in packages) { | 916 for (var package in packages) { |
| 914 var packageName = path.basename(package.path); | 917 var packageName = path.basename(package.path); |
| 915 var realPath = package.resolveSymbolicLinksSync(); | 918 var realPath = package.resolveSymbolicLinksSync(); |
| 916 result[packageName] = [ | 919 result[packageName] = [ |
| 917 PhysicalResourceProvider.INSTANCE.getFolder(realPath) | 920 PhysicalResourceProvider.INSTANCE.getFolder(realPath) |
| 918 ]; | 921 ]; |
| 919 } | 922 } |
| 920 return result; | 923 return result; |
| 921 } | 924 } |
| 922 } | 925 } |
| OLD | NEW |