Skip to content

Commit ab884b7

Browse files
keertipCommit Queue
authored andcommitted
Refactors to allow for parse only mode for lints and fixes.
- Make CorrectionProducer as base class for {Parsed/Resolved}CorrectionProducer. - Use ParsedCorrectionProducer for ConvertDocumentationIntoLine - Move sort imports test to used ParsedUnitResult - Add getter to LintRule to indicate that rule can be run using just parsed AST Change-Id: Id11466c445e6e505ea752d097b57143f18c47060 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310484 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Keerti Parthasarathy <[email protected]>
1 parent fe35362 commit ab884b7

File tree

267 files changed

+507
-467
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

267 files changed

+507
-467
lines changed

pkg/analysis_server/lib/src/services/correction/assist_internal.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ import 'package:analyzer_plugin/utilities/change_builder/conflicting_edit_except
8383
/// The computer for Dart assists.
8484
class AssistProcessor extends BaseProcessor {
8585
/// A map that can be used to look up the names of the lints for which a given
86-
/// [CorrectionProducer] will be used.
86+
/// [ResolvedCorrectionProducer] will be used.
8787
static final Map<ProducerGenerator, Set<String>> lintRuleMap =
8888
createLintRuleMap();
8989

pkg/analysis_server/lib/src/services/correction/bulk_fix_processor.dart

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,7 @@ class BulkFixProcessor {
249249
}
250250

251251
Future<void> _applyProducer(
252-
CorrectionProducerContext<ResolvedUnitResult> context,
253-
CorrectionProducer producer) async {
252+
CorrectionProducerContext context, CorrectionProducer producer) async {
254253
producer.configure(context);
255254
try {
256255
var localBuilder = builder.copy();
@@ -512,10 +511,8 @@ class BulkFixProcessor {
512511
}
513512
}
514513

515-
Future<void> _generateFix(
516-
CorrectionProducerContext<ResolvedUnitResult> context,
517-
CorrectionProducer producer,
518-
String code) async {
514+
Future<void> _generateFix(CorrectionProducerContext context,
515+
CorrectionProducer producer, String code) async {
519516
int computeChangeHash() => (builder as ChangeBuilderImpl).changeHash;
520517

521518
var oldHash = computeChangeHash();

0 commit comments

Comments
 (0)