Skip to content

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

Merged
merged 3 commits into from
Aug 6, 2025

Conversation

stephen-carter-at-sf
Copy link
Collaborator

No description provided.

@stephen-carter-at-sf stephen-carter-at-sf marked this pull request as ready for review August 5, 2025 20:09
expect(diagnostics[0].relatedInformation[1].message).to.equal(`/*\n//ApexGuru Suggestions: \n${expectedSuggestedCode}\n*/`);
});

test('Transforms valid JSON string to Violations for code violations', () => {
Copy link
Collaborator Author

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;
Copy link
Collaborator

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*/`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
fixedCode: `/*\n//ApexGuru Suggestions: \n${suggestedCode}\n*/`
fixedCode: `/*\n//ApexGuru Fixes: \n${suggestedCode}\n*/`

Copy link
Collaborator Author

@stephen-carter-at-sf stephen-carter-at-sf Aug 6, 2025

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.

Copy link
Collaborator

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK fixed. Good catch.

@stephen-carter-at-sf stephen-carter-at-sf merged commit 76a3528 into dev Aug 6, 2025
8 checks passed
@stephen-carter-at-sf stephen-carter-at-sf deleted the sc/W-19160212 branch August 6, 2025 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants