which versions are you using (SonarQube 8.6, Scanner 3.7, Plugin maven , and any relevant extension)
what are you trying to achieve: Sonar should report issues/bugs on new code only.
what have you tried so far to achieve this: I have commented few lines of code and pushed the code to gerrit and jenkins job triggered automatically. As part of build sonar considered previous build files and also reported issues on that files which is not part of my commit.
Could you please help me why sonar considering previous commit files?