| 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 import 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'dart:io' as io; | 6 import 'dart:io' as io; |
| 7 | 7 |
| 8 import 'package:analyzer/error/error.dart'; | 8 import 'package:analyzer/error/error.dart'; |
| 9 import 'package:analyzer/file_system/file_system.dart' as file_system; | 9 import 'package:analyzer/file_system/file_system.dart' as file_system; |
| 10 import 'package:analyzer/file_system/file_system.dart'; | 10 import 'package:analyzer/file_system/file_system.dart'; |
| (...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 dartSdk.analysisOptions = analysisOptions; | 740 dartSdk.analysisOptions = analysisOptions; |
| 741 sdk = dartSdk; | 741 sdk = dartSdk; |
| 742 } | 742 } |
| 743 } | 743 } |
| 744 } | 744 } |
| 745 | 745 |
| 746 bool _shouldBeFatal(ErrorSeverity severity, CommandLineOptions options) { | 746 bool _shouldBeFatal(ErrorSeverity severity, CommandLineOptions options) { |
| 747 if (severity == ErrorSeverity.ERROR) { | 747 if (severity == ErrorSeverity.ERROR) { |
| 748 return true; | 748 return true; |
| 749 } else if (severity == ErrorSeverity.WARNING && | 749 } else if (severity == ErrorSeverity.WARNING && |
| 750 (options.warningsAreFatal || options.hintsAreFatal)) { | 750 (options.warningsAreFatal || options.infosAreFatal)) { |
| 751 return true; | 751 return true; |
| 752 } else if (severity == ErrorSeverity.INFO && options.hintsAreFatal) { | 752 } else if (severity == ErrorSeverity.INFO && options.infosAreFatal) { |
| 753 return true; | 753 return true; |
| 754 } else { | 754 } else { |
| 755 return false; | 755 return false; |
| 756 } | 756 } |
| 757 } | 757 } |
| 758 | 758 |
| 759 static AnalysisOptionsImpl createAnalysisOptionsForCommandLineOptions( | 759 static AnalysisOptionsImpl createAnalysisOptionsForCommandLineOptions( |
| 760 ResourceProvider resourceProvider, CommandLineOptions options) { | 760 ResourceProvider resourceProvider, CommandLineOptions options) { |
| 761 if (options.analysisOptionsFile != null) { | 761 if (options.analysisOptionsFile != null) { |
| 762 file_system.File file = | 762 file_system.File file = |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 888 for (var package in packages) { | 888 for (var package in packages) { |
| 889 var packageName = path.basename(package.path); | 889 var packageName = path.basename(package.path); |
| 890 var realPath = package.resolveSymbolicLinksSync(); | 890 var realPath = package.resolveSymbolicLinksSync(); |
| 891 result[packageName] = [ | 891 result[packageName] = [ |
| 892 PhysicalResourceProvider.INSTANCE.getFolder(realPath) | 892 PhysicalResourceProvider.INSTANCE.getFolder(realPath) |
| 893 ]; | 893 ]; |
| 894 } | 894 } |
| 895 return result; | 895 return result; |
| 896 } | 896 } |
| 897 } | 897 } |
| OLD | NEW |