File tree Expand file tree Collapse file tree 8 files changed +28
-20
lines changed Expand file tree Collapse file tree 8 files changed +28
-20
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ import 'package:analyzer/src/dart/element/type_system.dart';
2727import 'package:analyzer/src/error/codes.dart' ;
2828import 'package:analyzer/src/lint/linter_visitor.dart' show NodeLintRegistry;
2929import 'package:analyzer/src/lint/pub.dart' ;
30- import 'package:analyzer/src/lint/registry.dart' ;
3130import 'package:analyzer/src/lint/state.dart' ;
3231import 'package:analyzer/src/workspace/workspace.dart' ;
3332import 'package:meta/meta.dart' ;
@@ -183,20 +182,6 @@ final class LinterContextWithResolvedResults implements LinterContext {
183182 LibraryElement2 get libraryElement2 => libraryElement as LibraryElement2 ;
184183}
185184
186- class LinterOptions {
187- final Iterable <LintRule > enabledRules;
188-
189- /// The path to the Dart SDK.
190- String ? dartSdkPath;
191-
192- /// Whether to gather timing data during analysis.
193- bool enableTiming = false ;
194-
195- LinterOptions ({
196- Iterable <LintRule >? enabledRules,
197- }) : enabledRules = enabledRules ?? Registry .ruleRegistry;
198- }
199-
200185/// Describes a lint rule.
201186abstract class LintRule {
202187 /// Used to report lint warnings.
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ export 'package:analyzer/src/lint/linter.dart'
2121 dart3_3,
2222 LintRule,
2323 LinterContext,
24- LinterOptions,
2524 NodeLintRegistry,
2625 State;
2726export 'package:analyzer/src/lint/pub.dart' show PSEntry, PubspecVisitor;
Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ import 'package:analyzer/src/dart/analysis/analysis_context_collection.dart';
1313import 'package:analyzer/src/generated/engine.dart' show AnalysisEngine;
1414// ignore: implementation_imports
1515import 'package:analyzer/src/lint/io.dart' ;
16- // ignore: implementation_imports
17- import 'package:analyzer/src/lint/linter .dart' ;
16+
17+ import 'linter_options .dart' ;
1818
1919import 'analysis_error_info.dart' ;
2020
Original file line number Diff line number Diff line change 1+ // Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
2+ // for details. All rights reserved. Use of this source code is governed by a
3+ // BSD-style license that can be found in the LICENSE file.
4+
5+ // ignore: implementation_imports
6+ import 'package:analyzer/src/lint/linter.dart' ;
7+ // ignore: implementation_imports
8+ import 'package:analyzer/src/lint/registry.dart' ;
9+
10+ class LinterOptions {
11+ final Iterable <LintRule > enabledRules;
12+
13+ /// The path to the Dart SDK.
14+ String ? dartSdkPath;
15+
16+ /// Whether to gather timing data during analysis.
17+ bool enableTiming = false ;
18+
19+ LinterOptions ({
20+ Iterable <LintRule >? enabledRules,
21+ }) : enabledRules = enabledRules ?? Registry .ruleRegistry;
22+ }
Original file line number Diff line number Diff line change @@ -13,14 +13,13 @@ import 'package:analyzer/source/source.dart';
1313// ignore: implementation_imports
1414import 'package:analyzer/src/lint/io.dart' ;
1515// ignore: implementation_imports
16- import 'package:analyzer/src/lint/linter.dart' ;
17- // ignore: implementation_imports
1816import 'package:analyzer/src/lint/pub.dart' ;
1917import 'package:meta/meta.dart' ;
2018import 'package:path/path.dart' as path;
2119
2220import 'analysis_error_info.dart' ;
2321import 'lint_driver.dart' ;
22+ import 'linter_options.dart' ;
2423
2524Source createSource (Uri uri) {
2625 var filePath = uri.toFilePath ();
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import 'package:analyzer/src/test_utilities/mock_sdk.dart';
1212import 'package:path/path.dart' as path;
1313
1414import '../analyzer.dart' ;
15+ import 'linter_options.dart' ;
1516import 'test_linter.dart' ;
1617
1718/// Builds the [TestLinter] with appropriate mock SDK, resource providers, and
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import 'package:analyzer/error/error.dart';
66import 'package:analyzer/src/lint/linter.dart' ;
77import 'package:analyzer/src/lint/pub.dart' ;
88import 'package:analyzer/src/string_source.dart' show StringSource;
9+ import 'package:linter/src/test_utilities/linter_options.dart' ;
910import 'package:linter/src/test_utilities/test_linter.dart' ;
1011import 'package:linter/src/utils.dart' ;
1112import 'package:test/test.dart' ;
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import 'package:linter/src/extensions.dart';
1616import 'package:linter/src/rules.dart' ;
1717import 'package:linter/src/test_utilities/analysis_error_info.dart' ;
1818import 'package:linter/src/test_utilities/formatter.dart' ;
19+ import 'package:linter/src/test_utilities/linter_options.dart' ;
1920import 'package:linter/src/test_utilities/test_linter.dart' ;
2021import 'package:yaml/yaml.dart' ;
2122
You can’t perform that action at this time.
0 commit comments