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

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

Issue 2726783002: echo analysis options information if dartanalyzer --verbose is specified (Closed)
Patch Set: merge Created 3 years, 9 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 | « pkg/analyzer/lib/src/context/builder.dart ('k') | no next file » | 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 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 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 741
742 String contextRoot; 742 String contextRoot;
743 if (options.sourceFiles.isEmpty) { 743 if (options.sourceFiles.isEmpty) {
744 contextRoot = path.current; 744 contextRoot = path.current;
745 } else { 745 } else {
746 contextRoot = options.sourceFiles[0]; 746 contextRoot = options.sourceFiles[0];
747 if (!path.isAbsolute(contextRoot)) { 747 if (!path.isAbsolute(contextRoot)) {
748 contextRoot = path.absolute(contextRoot); 748 contextRoot = path.absolute(contextRoot);
749 } 749 }
750 } 750 }
751
752 void verbosePrint(String text) {
753 outSink.writeln(text);
754 }
755
751 AnalysisOptionsImpl contextOptions = new ContextBuilder( 756 AnalysisOptionsImpl contextOptions = new ContextBuilder(
752 resourceProvider, null, null, 757 resourceProvider, null, null,
753 options: options.contextBuilderOptions) 758 options: options.contextBuilderOptions)
754 .getAnalysisOptions(contextRoot); 759 .getAnalysisOptions(contextRoot,
760 verbosePrint: options.verbose ? verbosePrint : null);
755 761
756 contextOptions.trackCacheDependencies = false; 762 contextOptions.trackCacheDependencies = false;
757 contextOptions.disableCacheFlushing = options.disableCacheFlushing; 763 contextOptions.disableCacheFlushing = options.disableCacheFlushing;
758 contextOptions.hint = !options.disableHints; 764 contextOptions.hint = !options.disableHints;
759 contextOptions.generateImplicitErrors = options.showPackageWarnings; 765 contextOptions.generateImplicitErrors = options.showPackageWarnings;
760 contextOptions.generateSdkErrors = options.showSdkWarnings; 766 contextOptions.generateSdkErrors = options.showSdkWarnings;
761 767
762 return contextOptions; 768 return contextOptions;
763 } 769 }
764 770
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 for (var package in packages) { 912 for (var package in packages) {
907 var packageName = path.basename(package.path); 913 var packageName = path.basename(package.path);
908 var realPath = package.resolveSymbolicLinksSync(); 914 var realPath = package.resolveSymbolicLinksSync();
909 result[packageName] = [ 915 result[packageName] = [
910 PhysicalResourceProvider.INSTANCE.getFolder(realPath) 916 PhysicalResourceProvider.INSTANCE.getFolder(realPath)
911 ]; 917 ];
912 } 918 }
913 return result; 919 return result;
914 } 920 }
915 } 921 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/context/builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698