SLVS-1236 Add Change status option to editor quick actions - #6682
SLVS-1236 Add Change status option to editor quick actions#6682georgii-borovinskikh-sonarsource wants to merge 3 commits into
Change status option to editor quick actions#6682Conversation
SummaryThis PR adds a "Change status" quick action option to the SonarLint editor, complementing the existing quick fixes functionality. The changes include: Core Implementation:
Refactoring:
Dependencies:
Testing:
What reviewers should knowWhere to start:
Non-obvious design decisions:
Key areas to watch:
|
There was a problem hiding this comment.
One real bug to fix before merge: taint issues can appear in the new quick action but are always resolved as non-taint issues.
SonarQube Cloud quality gate is failing — 5 new issues need to be resolved. See the reviewer guide above for details. The two MAJOR findings (IssueActionsSourceBase IDisposable pattern and the obsolete SuggestedActionSet constructor) are worth addressing given they're in newly introduced production code.
| return; | ||
| } | ||
|
|
||
| muteIssuesService.ResolveIssueWithDialog(issueVisualization.IssueServerKey, isTaintIssue: false); |
There was a problem hiding this comment.
isTaintIssue: false is hardcoded, but this action will also be offered for taint issues.
ChangeStatusActionsSource.TryGetMatchingIssues filters only on !IsResolved && IssueServerKey != null. Taint issues satisfy both conditions — they always have a server key (set in TaintStore) and can be unresolved. The AggregatingIssueLocationStoreAdapter aggregates taint issues alongside regular ones, so they appear in the same IIssueLocationTag stream.
When a user clicks "Change status" on a taint issue, this calls the regular-issue review path (isTaintIssue: false) instead of the taint review path — exactly the opposite of what TaintsReportViewModel does for the same operation.
Two valid fixes depending on intent:
- If taint issues are out of scope, exclude them in
ChangeStatusActionsSource.TryGetMatchingIssues:matchingIssues = issueVisualizations .Where(x => !x.IsResolved && x.IssueServerKey != null && x.Issue is not ITaintIssue);
- If taint issues should also be handled, detect the type in
Invokeand pass the correct flag.
| muteIssuesService.ResolveIssueWithDialog(issueVisualization.IssueServerKey, isTaintIssue: false); | |
| muteIssuesService.ResolveIssueWithDialog(issueVisualization.IssueServerKey, isTaintIssue: issueVisualization.Issue is ITaintIssue); |
- Mark as noise
|
| return; | ||
| } | ||
|
|
||
| muteIssuesService.ResolveIssueWithDialog(issueVisualization.IssueServerKey, isTaintIssue: false); |
There was a problem hiding this comment.
isTaintIssue: false is still hardcoded. ChangeStatusActionsSource.TryGetMatchingIssues filters only on !IsResolved && IssueServerKey != null, which taint issues satisfy. When a user clicks "Change status" on a taint issue, the wrong review path is invoked.
Either exclude taint issues at the filter level in ChangeStatusActionsSource:
.Where(x => !x.IsResolved && x.IssueServerKey != null && x.Issue is not ITaintIssue)Or pass the correct flag at the call site:
| muteIssuesService.ResolveIssueWithDialog(issueVisualization.IssueServerKey, isTaintIssue: false); | |
| muteIssuesService.ResolveIssueWithDialog(issueVisualization.IssueServerKey, isTaintIssue: issueVisualization.Issue is ITaintIssue); |
- Mark as noise

Part of