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

Unified Diff: pkg/analysis_server/lib/src/server/driver.dart

Issue 2976473003: add analysis server --flutter-repo startup flag (Closed)
Patch Set: address comments Created 3 years, 5 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
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/context/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/server/driver.dart
diff --git a/pkg/analysis_server/lib/src/server/driver.dart b/pkg/analysis_server/lib/src/server/driver.dart
index 7f63419006fd6e2ea79544967aa2cd78c2c91aa1..cd843de0c537f028f941ed1264678d64335c1267 100644
--- a/pkg/analysis_server/lib/src/server/driver.dart
+++ b/pkg/analysis_server/lib/src/server/driver.dart
@@ -18,6 +18,7 @@ import 'package:analyzer/file_system/physical_file_system.dart';
import 'package:analyzer/instrumentation/file_instrumentation.dart';
import 'package:analyzer/instrumentation/instrumentation.dart';
import 'package:analyzer/plugin/resolver_provider.dart';
+import 'package:analyzer/src/context/builder.dart';
import 'package:analyzer/src/dart/sdk/sdk.dart';
import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/sdk.dart';
@@ -196,6 +197,12 @@ class Driver implements ServerStarter {
static const String FILE_READ_MODE = "file-read-mode";
/**
+ * The name of the flag used when analyzing the flutter repository.
+ * See comments in source for `flutter analyze --watch`.
+ */
+ static const FLUTTER_REPO = "flutter-repo";
+
+ /**
* The name of the option used to print usage information.
*/
static const String HELP_OPTION = "help";
@@ -310,6 +317,8 @@ class Driver implements ServerStarter {
analysisServerOptions.enableVerboseFlutterCompletions =
results[VERBOSE_FLUTTER_COMPLETIONS];
+ ContextBuilderOptions.flutterRepo = results[FLUTTER_REPO];
+
telemetry.Analytics analytics = telemetry.createAnalyticsInstance(
'UA-26406144-29', 'analysis-server',
disableForSession: results[SUPPRESS_ANALYTICS_FLAG]);
@@ -485,6 +494,10 @@ class Driver implements ServerStarter {
help: "enable sending instrumentation information to a server",
defaultsTo: false,
negatable: false);
+ parser.addFlag(FLUTTER_REPO,
+ help: 'used by "flutter analyze" to enable specific lints'
+ ' when analyzing the flutter repository',
+ hide: false);
parser.addFlag(HELP_OPTION,
help: "print this help message without starting a server",
abbr: 'h',
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/context/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698