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

Unified Diff: pkg/analyzer_experimental/bin/analyzer.dart

Issue 16357010: Basic dart^2 analyzer tests running. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer_experimental/bin/analyzer.dart
diff --git a/pkg/analyzer_experimental/bin/analyzer.dart b/pkg/analyzer_experimental/bin/analyzer.dart
index cf8018f0778bd1e0ee47f29bfaaaca2c7a684126..c9b83c8c1e5cf6d40b1aa3e4772d24a36c0a43f0 100644
--- a/pkg/analyzer_experimental/bin/analyzer.dart
+++ b/pkg/analyzer_experimental/bin/analyzer.dart
@@ -38,6 +38,10 @@ void main() {
}
ErrorSeverity _runAnalyzer(CommandLineOptions options) {
+ if (!options.machineFormat) {
+ stdout.writeln("Analyzing ${options.sourceFiles}...");
+ }
+ ErrorSeverity allResult = ErrorSeverity.NONE;
for (String sourcePath in options.sourceFiles) {
sourcePath = sourcePath.trim();
// check that file exists
@@ -50,10 +54,8 @@ ErrorSeverity _runAnalyzer(CommandLineOptions options) {
print('$sourcePath is not a Dart file');
return ErrorSeverity.ERROR;
}
- // start analysis
- ErrorFormatter formatter = new ErrorFormatter(options.machineFormat ? stderr : stdout, options);
- formatter.startAnalysis();
// do analyze
+ ErrorFormatter formatter = new ErrorFormatter(options.machineFormat ? stderr : stdout, options);
AnalyzerImpl analyzer = new AnalyzerImpl(options);
analyzer.analyze(sourcePath);
// pring errors
@@ -63,8 +65,9 @@ ErrorSeverity _runAnalyzer(CommandLineOptions options) {
if (status == ErrorSeverity.WARNING && options.warningsAreFatal) {
status = ErrorSeverity.ERROR;
}
- return status;
+ allResult = allResult.max(status);
}
+ return allResult;
}
typedef ErrorSeverity BatchRunnerHandler(List<String> args);
@@ -101,6 +104,8 @@ class BatchRunner {
args.addAll(lineArgs);
args.remove('-b');
args.remove('--batch');
+ // TODO(scheglov) https://code.google.com/p/dart/issues/detail?id=11061
+ args.remove('-batch');
}
// analyze single set of arguments
try {

Powered by Google App Engine
This is Rietveld 408576698