-
Notifications
You must be signed in to change notification settings - Fork 3
NEW: @W-19160212@: Unify quick fix experience and prepare ApexGuru violations to use it #263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
91cc35b
to
d6ab887
Compare
fdf3ad7
to
f5746ce
Compare
expect(diagnostics[0].relatedInformation[1].message).to.equal(`/*\n//ApexGuru Suggestions: \n${expectedSuggestedCode}\n*/`); | ||
}); | ||
|
||
test('Transforms valid JSON string to Violations for code violations', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This entire legacy test seems to be a duplicate of the one above it.
// Technically, I don't think VS Code sends in diagnostics that aren't overlapping with the users selection, | ||
// but just in case they do, then this last filter is an additional sanity check just to be safe | ||
.filter(d => range.intersection(d.range) != undefined); | ||
|
||
if (filteredDiagnostics.length == 0) { | ||
return codeActions; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, this reads much cleaner 👍
violation.fixes = [ | ||
{ | ||
location: violationLocation, | ||
fixedCode: `/*\n//ApexGuru Suggestions: \n${suggestedCode}\n*/` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixedCode: `/*\n//ApexGuru Suggestions: \n${suggestedCode}\n*/` | |
fixedCode: `/*\n//ApexGuru Fixes: \n${suggestedCode}\n*/` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is all temporary (as an intermediate of the old pilot world) - it's just fluff until we get the real responses from the ApexGuru team (which is a separate work item for us to encorporate)... so I just left things as similar as they were before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: There's a typo in the file name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK fixed. Good catch.
f5746ce
to
0c90346
Compare
No description provided.