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

Unified Diff: pkg/analyzer_cli/lib/starter.dart

Issue 1646413003: Add hook to command-line analyzer similar to server (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 | « pkg/analyzer_cli/lib/src/driver.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_cli/lib/starter.dart
diff --git a/pkg/analyzer_cli/lib/starter.dart b/pkg/analyzer_cli/lib/starter.dart
new file mode 100644
index 0000000000000000000000000000000000000000..d51dc5e4fb7d9f48c80451599b154384b8366029
--- /dev/null
+++ b/pkg/analyzer_cli/lib/starter.dart
@@ -0,0 +1,40 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer_cli.starter;
+
+import 'package:analyzer_cli/plugin/analysis/resolver_provider.dart';
+import 'package:analyzer_cli/src/driver.dart';
+import 'package:plugin/plugin.dart';
+
+/**
+ * An object that can be used to start a command-line analysis. This class
+ * exists so that clients can configure a command-line analyzer before starting
+ * it.
+ *
+ * Clients may not extend, implement or mix-in this class.
+ */
+abstract class CommandLineStarter {
+ /**
+ * Initialize a newly created starter to start up a command-line analysis.
+ */
+ factory CommandLineStarter() = Driver;
+
+ /**
+ * Set the package resolver provider used to override the way package URI's
+ * are resolved in some contexts. The provider should return `null` if the
+ * default package resolution scheme should be used instead.
+ */
+ void set packageResolverProvider(ResolverProvider provider);
+
+ /**
+ * Set the [plugins] that are defined outside the analyzer_cli package.
+ */
+ void set userDefinedPlugins(List<Plugin> plugins);
+
+ /**
+ * Use the given command-line [arguments] to start this analyzer.
+ */
+ void start(List<String> arguments);
+}
« no previous file with comments | « pkg/analyzer_cli/lib/src/driver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698