-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
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.
sdk/pkg/analysis_server/lib/src/services/correction/assist.dart
Lines 34 to 39 in 7cadd70
| 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?