Skip to content

Commit

Permalink
fix async fix processor name
Browse files Browse the repository at this point in the history
Change-Id: Ie6e0a0e3e42ce07f4a5a8334a4f4240c8c0fa64d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153624
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
  • Loading branch information
pq authored and commit-bot@chromium.org committed Jul 8, 2020
1 parent f2cbec8 commit 7498fac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import 'package:analyzer/dart/ast/ast.dart';
import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
import 'package:analyzer_plugin/utilities/fixes/fixes.dart';

class AddSync extends CorrectionProducer {
class AddAsync extends CorrectionProducer {
@override
FixKind get fixKind => DartFixKind.ADD_ASYNC;

Expand All @@ -24,5 +24,5 @@ class AddSync extends CorrectionProducer {
}

/// Return an instance of this class. Used as a tear-off in `FixProcessor`.
static AddSync newInstance() => AddSync();
static AddAsync newInstance() => AddAsync();
}
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ class FixProcessor extends BaseProcessor {
RemoveTypeAnnotation.newInstance,
],
LintNames.avoid_returning_null_for_future: [
AddSync.newInstance,
AddAsync.newInstance,
WrapInFuture.newInstance,
],
LintNames.avoid_types_as_parameter_names: [
Expand Down Expand Up @@ -573,10 +573,10 @@ class FixProcessor extends BaseProcessor {
/// generators used for lint rules are in the [lintProducerMap].
static const Map<ErrorCode, List<ProducerGenerator>> nonLintProducerMap = {
CompileTimeErrorCode.ASYNC_FOR_IN_WRONG_CONTEXT: [
AddSync.newInstance,
AddAsync.newInstance,
],
CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT: [
AddSync.newInstance,
AddAsync.newInstance,
],
CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE: [
UseConst.newInstance,
Expand Down Expand Up @@ -989,7 +989,7 @@ class FixProcessor extends BaseProcessor {
CreateSetter.newInstance,
],
StaticWarningCode.UNDEFINED_IDENTIFIER_AWAIT: [
AddSync.newInstance,
AddAsync.newInstance,
],
};

Expand Down

0 comments on commit 7498fac

Please sign in to comment.