Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Side by Side Diff: pkg/analyzer_cli/lib/src/driver.dart

Issue 2874043002: Add --fatal-infos; hide --fatal-hints. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analyzer_cli/lib/src/options.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer_cli/lib/src/options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698