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 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 plugins.addAll(_userDefinedPlugins); | 621 plugins.addAll(_userDefinedPlugins); |
622 | 622 |
623 ExtensionManager manager = new ExtensionManager(); | 623 ExtensionManager manager = new ExtensionManager(); |
624 manager.processPlugins(plugins); | 624 manager.processPlugins(plugins); |
625 } | 625 } |
626 | 626 |
627 /// Analyze a single source. | 627 /// Analyze a single source. |
628 ErrorSeverity _runAnalyzer(Source source, CommandLineOptions options) { | 628 ErrorSeverity _runAnalyzer(Source source, CommandLineOptions options) { |
629 int startTime = currentTimeMillis(); | 629 int startTime = currentTimeMillis(); |
630 AnalyzerImpl analyzer = | 630 AnalyzerImpl analyzer = |
631 new AnalyzerImpl(_context, source, options, stats, startTime); | 631 new AnalyzerImpl(_context, incrementalSession, source, options, stats, s
tartTime); |
632 var errorSeverity = analyzer.analyzeSync(); | 632 var errorSeverity = analyzer.analyzeSync(); |
633 if (errorSeverity == ErrorSeverity.ERROR) { | 633 if (errorSeverity == ErrorSeverity.ERROR) { |
634 exitCode = errorSeverity.ordinal; | 634 exitCode = errorSeverity.ordinal; |
635 } | 635 } |
636 if (options.warningsAreFatal && errorSeverity == ErrorSeverity.WARNING) { | 636 if (options.warningsAreFatal && errorSeverity == ErrorSeverity.WARNING) { |
637 exitCode = errorSeverity.ordinal; | 637 exitCode = errorSeverity.ordinal; |
638 } | 638 } |
639 return errorSeverity; | 639 return errorSeverity; |
640 } | 640 } |
641 | 641 |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 for (var package in packages) { | 855 for (var package in packages) { |
856 var packageName = path.basename(package.path); | 856 var packageName = path.basename(package.path); |
857 var realPath = package.resolveSymbolicLinksSync(); | 857 var realPath = package.resolveSymbolicLinksSync(); |
858 result[packageName] = [ | 858 result[packageName] = [ |
859 PhysicalResourceProvider.INSTANCE.getFolder(realPath) | 859 PhysicalResourceProvider.INSTANCE.getFolder(realPath) |
860 ]; | 860 ]; |
861 } | 861 } |
862 return result; | 862 return result; |
863 } | 863 } |
864 } | 864 } |
OLD | NEW |