forcedotcom / sfdx-code-analyzer-vscode

Salesforce Code Analyzer is a unified tool for source code analysis. Run Code Analyzer to scan multiple languages in your code and add diagnostic info to your code that describes the violations.
BSD 3-Clause "New" or "Revised" License
8 stars 1 forks source link

NEW (Extension) @W-13992309@ Remove duplicate suppress violations prompts on the same line #92

Closed jag-j closed 3 months ago

jag-j commented 3 months ago

This PR does the following:

  1. Shows only one "suppress warning" per line on the editor and in the "Problems" tab per line even if there are multiple violations were found on a line. Previously, multiple "suppress warning"s would show up and they all would add the same "// NOPMD" tag.
  2. Additionally, this PR also clears all the diagnostics on the line automatically. We do this by changing the removeSingleDiagnostics command to a more generic removeDiagnosticsInRange that clears all diagnostics in a given range.