Flexible mapping of SonarLint severity to Eclipse problem severitiy and editor annotations


(Christoph Strebin) #1


could you please make the Eclipse severity mapping more flexible, and add a severity distinction to the editor annotations?

I suggest something like:

Problems view (preference SonarLint / Severity of SonarLint markers):

  • Replace the drop-down list with five separate drop-down lists, one per SonarLint severity.
  • Add “Ignore” to each drop-down list (like in preference Java / Compiler / Errors/Warnings).

This would also make it possible to configure strange combinations, e.g. Sonar Minor -> Eclipse Error and Sonar Major -> Eclipse Info. But I wouldn’t bother to prohibit that (probably making the dialog less intuitive just to save the user a few clicks).

Editor Annotations (preference General / Editors / Text Editors / Annotations):

  • Replace the single “SonarLint issue” annotation with five separate annotations, one per SonarLint severity.
  • Or maybe three annotations: “SonarLint info”, “SonarLint warning”, “SonarLint error”, refering to the Eclipse severity mapped in preference “SonarLint / Severity of SonarLint markers”. For example, when SonarLint critical has been mapped to Eclipse error, the “SonarLint error” annotation type would be used for criticals.

I favor the former approach, which requires a few clicks more, but is easy and more flexible.