Add 'fixAllDescription' property to CodeFixAction#22616
Conversation
7408893 to
ae036dc
Compare
|
@DanielRosenwasser @amcasey Could someone review? |
amcasey
left a comment
There was a problem hiding this comment.
No objections but not reviewed in fine detail.
| "category": "Message", | ||
| "code": 95020 | ||
| }, | ||
| "Fix all like: ": { |
| "category": "Message", | ||
| "code": 95024 | ||
| }, | ||
| "Prefix all unused declarations with '_'": { |
There was a problem hiding this comment.
Does this only apply to parameters?
There was a problem hiding this comment.
That's determined by function canPrefix in fixUnusedIdentifier.ts -- so for the most part just parameters. I'll add where possible to the text.
| "category": "Message", | ||
| "code": 95025 | ||
| }, | ||
| "Fix all spelling errors": { |
There was a problem hiding this comment.
We might want to hedge here because we are definitely not going to fix all spelling errors. 😄
There was a problem hiding this comment.
Changing to "fix all detected spelling errors"
| * This may be omitted to indicate that the code fix can't be applied in a group. | ||
| */ | ||
| fixId?: {}; | ||
| fixAllDescription?: SymbolDisplayPart[]; |
There was a problem hiding this comment.
VS is not expected to consume this, correct?
There was a problem hiding this comment.
Don't see why you couldn't -- what's the current behavior to display a fix-all?
There was a problem hiding this comment.
We show a separate dialog with a list of possible scopes:
https://www.visualstudio.com/wp-content/uploads/2016/11/Productivity-Epic-960x540.jpg
There was a problem hiding this comment.
OK, guess you won't need this then.
There was a problem hiding this comment.
Why is this not just string?
There was a problem hiding this comment.
Thought we might like the ability to highlight things (not used in this PR), but I can just use string if that's not needed.
There was a problem hiding this comment.
Thought we might like the ability to highlight things
do you have an example in mind?
but I can just use string if that's not needed.
if we have a specific use case, then it is fine, otherwise, i would not add it.
|
|
||
| verify.codeFixAll({ | ||
| fixId: "annotateWithTypeFromJSDoc", | ||
| fixAllDescription: "Fix all like: Annotate with type from JSDoc", |
There was a problem hiding this comment.
More generally, why not customize every description?
e67ddb9 to
1c9f836
Compare
|
CC @mjbvz for change to |
506f1ca to
0781c35
Compare
007e85b to
3819e13
Compare
3819e13 to
4962c58
Compare
4962c58 to
10c4881
Compare
Fixes #21380