Is there a way to show issues in SonarLint based on new code only?


We are trying to investigate and see if its possible to show SonarQube issues in SonarLint based on new code only, as for some of our projects, we have created a new code period to fix issues only based on a baseline.

We are on SonarQube 8, and we use SonarLint in IntelliJ, Webstorm and VSCode IDEs.


Hello, thanks for asking.

Relying on the “new code period” as set on the server is currently not possible in any flavor of SonarLint.

I have to admit that I never thought about such a feature, I guess it can make sense e.g when tackling technical debt on a legacy project, where new issues can be hard to distinguish among the potentially large number of old issues.

In IntelliJ and WebStorm, you can use the “Analyze VCS Changed Files” feature to check whether changed files (from a SCM point of view) contain any issue.

Please note that this feature does not currently exist in VSCode.