SonarCloud is detecting code smells and bugs

SonarCloud is detecting code smells and bugs from 3 to 4 years old code for a new PR.

Current changes include 30 additions and 11 deletions in the pull request but the reliability rating is C based on 2 bugs identified from 4 years ago. Also 2 code smells are identified from 4 years ago.

Unable to resolve.

Hi @MANOJPATRA1991, welcome to our community!

Is this project a public one, in order to tell us the URL of it?
Can you copy and paste the logs from the scanner output here?
Did you changed anything regarding the quality gate/profile configuration for this project?
Additionally, could you please tell us the new code configuration for your project and organization?

Hi @Alexandre_Holzhey ,

I can’t share URL as this project is a private one for the organisation I am working for.

The quality gate/profile configuration has been changed a few times in last couple of months to deploy features for the app and avoid sonar build fails due to this issue.

But here’s the code configuration:

sonar.projectKey=${PROJECT_KEY}
sonar.organization=${ORG}
sonar.projectName=${PROJECT_NAME}
sonar.sources=src
sonar.tests=src
sonar.sourceEncoding=UTF-8
sonar.host.url=https://sonarcloud.io
sonar.login=${SONAR_TOKEN}
sonar.exclusions=**/*.spec.ts
sonar.test.inclusions=**/*.spec.ts
sonar.inclusions=**/*.ts
sonar.typescript.lcov.reportPaths=${PROJECT_PATH}/coverage/lcov.info

Thanks for your reply @MANOJPATRA1991. Unfortunately, the provided information did not help that much. This is happening only in a single PR or all PRs? About the quality profile, can you tell me if any rule is related to the code smells and bugs that were raised? If yes, please tell us the rules/conditions and when they were changed last time. Since your project is not public we really need more information to try understand your issue, so the scanner logs and the new code configuration are required for further investigations.