Why Clean as You Code Reports Methods Not Touched

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)

  • how is SonarQube deployed: zip, Docker, Helm

  • what are you trying to achieve

  • what have you tried so far to achieve this

  • SonarQube 10.2

  • Clean As You Code, but when add a new method in an existing class, I do not want untouched methods to be reported

I don’t even know what to try.

Scenario: we have a class, say Car, with 4 existing methods. We run initial analysis. Now, say two months later, we add a method to Car. However, all issues with Car are being reported in the analysis, not just what we changed.

How can we configure SoarQube so ONLY the changed code gets reported?

Thanks,

Tony

Hi Tony,

It’s likely that this is a problem with the detection of new code. Can you share your analysis log?

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them.

 
Ann