| 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 {
|
|
|