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

Unified Diff: pkg/analyzer/lib/src/lint/analysis.dart

Issue 2711763005: Rename one AnalysisDriver to LintDriver (Closed)
Patch Set: Created 3 years, 10 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/lint/linter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/lint/analysis.dart
diff --git a/pkg/analyzer/lib/src/lint/analysis.dart b/pkg/analyzer/lib/src/lint/analysis.dart
index 5949fd8fe5db5dd3d5c6894bb7b3e8ecdea22895..57d85e258fb0b302f7e95029857da220edc9940f 100644
--- a/pkg/analyzer/lib/src/lint/analysis.dart
+++ b/pkg/analyzer/lib/src/lint/analysis.dart
@@ -51,7 +51,41 @@ AnalysisOptions _buildAnalyzerOptions(DriverOptions options) {
return analysisOptions;
}
-class AnalysisDriver {
+class DriverOptions {
+ /// The maximum number of sources for which AST structures should be kept
+ /// in the cache. The default is 512.
+ int cacheSize = 512;
+
+ /// The path to the dart SDK.
+ String dartSdkPath;
+
+ /// Whether to show lint warnings.
+ bool enableLints = true;
+
+ /// Whether to gather timing data during analysis.
+ bool enableTiming = false;
+
+ /// The path to a `.packages` configuration file
+ String packageConfigPath;
+
+ /// The path to the package root.
+ String packageRootPath;
+
+ /// Whether to show SDK warnings.
+ bool showSdkWarnings = false;
+
+ /// Whether to use Dart's Strong Mode analyzer.
+ bool strongMode = true;
+
+ /// The mock SDK (to speed up testing) or `null` to use the actual SDK.
+ DartSdk mockSdk;
+
+ /// Whether to show lints for the transitive closure of imported and exported
+ /// libraries.
+ bool visitTransitiveClosure = false;
+}
+
+class LintDriver {
/// The sources which have been analyzed so far. This is used to avoid
/// analyzing a source more than once, and to compute the total number of
/// sources analyzed for statistics.
@@ -59,7 +93,7 @@ class AnalysisDriver {
final LinterOptions options;
- AnalysisDriver(this.options) {
+ LintDriver(this.options) {
_processPlugins();
}
@@ -216,40 +250,6 @@ class AnalysisDriver {
}
}
-class DriverOptions {
- /// The maximum number of sources for which AST structures should be kept
- /// in the cache. The default is 512.
- int cacheSize = 512;
-
- /// The path to the dart SDK.
- String dartSdkPath;
-
- /// Whether to show lint warnings.
- bool enableLints = true;
-
- /// Whether to gather timing data during analysis.
- bool enableTiming = false;
-
- /// The path to a `.packages` configuration file
- String packageConfigPath;
-
- /// The path to the package root.
- String packageRootPath;
-
- /// Whether to show SDK warnings.
- bool showSdkWarnings = false;
-
- /// Whether to use Dart's Strong Mode analyzer.
- bool strongMode = true;
-
- /// The mock SDK (to speed up testing) or `null` to use the actual SDK.
- DartSdk mockSdk;
-
- /// Whether to show lints for the transitive closure of imported and exported
- /// libraries.
- bool visitTransitiveClosure = false;
-}
-
/// Prints logging information comments to the [outSink] and error messages to
/// [errorSink].
class StdLogger extends Logger {
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/lint/linter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698