Skip to content

consider converting assists to fixes where there is a corresponding lint #37508

@pq

Description

@pq

Follow-up from conversation w/ @kevmoo, @devoncarew , @bwilkerson and @jwren.

As things currently stand there are a number of lints that have corresponding quick assists. The rub is that these assists do not show up in the problems view yet fixes do (and to the user they are indistinguishable).

One remedy would be to convert all assists with corresponding lints to fixes. The down-side of this is that not all users will enable the producing lint, meaning the assist will become only available to some users.

Another alternative would be to add explicit fixes duplicating the assists in these cases. (Without some care this could lead to doubled completion results.)

Another option might be to take advantage of the error code correspondences encoded in assists somehow.

static const ADD_TYPE_ANNOTATION = const AssistKind(
'dart.assist.addTypeAnnotation', 30, "Add type annotation",
associatedErrorCodes: <String>[
'always_specify_types',
'type_annotate_public_apis'
]);

Possibly these could be scanned and returned in the DAS getFixes call?

Metadata

Metadata

Assignees

Labels

devexp-linterIssues with the analyzer's support for the linter packagedevexp-quick-fixIssues with analysis server (quick) fixeslegacy-area-analyzerUse area-devexp instead.type-enhancementA request for a change that isn't a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions