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

Unified Diff: pkg/analyzer_cli/lib/src/perf_report.dart

Issue 1806263004: add --x-package-warnings-prefix option to dartanalyzer (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer_cli/lib/src/perf_report.dart
diff --git a/pkg/analyzer_cli/lib/src/perf_report.dart b/pkg/analyzer_cli/lib/src/perf_report.dart
index 208e56012c1c20103162e787c15db74fe9b83a79..1270e7ce18b56aa3d2ca79facd4d74542c350452 100644
--- a/pkg/analyzer_cli/lib/src/perf_report.dart
+++ b/pkg/analyzer_cli/lib/src/perf_report.dart
@@ -10,7 +10,9 @@ import 'dart:io' show File, Platform;
import 'package:analyzer/src/generated/utilities_general.dart'
show PerformanceTag;
import 'package:analyzer/task/model.dart' show AnalysisTask;
+import 'package:analyzer_cli/src/error_formatter.dart';
import 'package:analyzer_cli/src/options.dart' show CommandLineOptions;
+import 'package:analyzer/src/generated/engine.dart' show AnalysisContext;
const _JSON = const JsonEncoder.withIndent(" ");
@@ -39,7 +41,8 @@ String _osType = () {
}
}();
-String makePerfReport(int startTime, int endTime, CommandLineOptions options) {
+String makePerfReport(int startTime, int endTime, CommandLineOptions options,
+ AnalysisContext context) {
int totalTime = endTime - startTime;
int otherTime = totalTime;
@@ -53,6 +56,7 @@ String makePerfReport(int startTime, int endTime, CommandLineOptions options) {
'dartSdkPath': options.dartSdkPath,
'strongMode': options.strongMode,
'showPackageWarnings': options.showPackageWarnings,
+ 'showPackageWarningsPrefix': options.showPackageWarningsPrefix,
'showSdkWarnings': options.showSdkWarnings,
'definedVariables': options.definedVariables,
'packageRootPath': options.packageRootPath,
@@ -89,6 +93,8 @@ String makePerfReport(int startTime, int endTime, CommandLineOptions options) {
'options': optionsJson,
'totalElapsedTime': totalTime,
'totalTaskTime': totalTaskTime,
+ 'analyzedFiles': context.sources.length,
+ 'generatedDiagnostics': ErrorFormatter.inputErrorCount,
'performanceTags': perfTagsJson,
'tasks': taskRows.map((r) => r.toJson()).toList(),
};

Powered by Google App Engine
This is Rietveld 408576698