SonarQube scanner for Pull-request analysis shows all code smells for a file instead of code smells only for newly added code

version: SonarQube 7.9, SonarCFamily plugin version:, SonarScanner CLI- 4.3

Why does my PR analysis shows code smells/issues for all the code in the file instead of for the newly added code in that particular file?

Hello @rohan1 and welcome to our community!

Would you be able to update SonarQube to the newest version, 8.9, and check if you still have the issue?