- ALM used: GitHub
- CI system used: Github Actions
- Scanner command used when applicable (private details masked)
dotnet sonarscanner begin /d:sonar.host.url=https://sonarcloud.io/ /o:${{OurOrganizationName}} /k:${{OurProjectName}} /d:sonar.login=*** /d:"sonar.cs.nunit.reportsPaths=**/{{Redacted}}.xml" /d:"sonar.cs.opencover.reportsPaths={{Redacted}}
-
Languages of the repository: c# / .net
-
Error observed
Sonar is reporting new issues on files that have not been modified for months (long before the new code definition)
Our “new code” definition is based off a certain version.
We create a new version every few weeks (in the “Activity” tab in sonarcloud)
e.g. Sonar has flagged a Bug in our New Code. When I open the issue (c# file), sonar says the issue was introduced “14 days ago”.
When I look at the git history for that same file, the file was last modified Aug 15 (3 months ago).
I don’t understand why sonar is raising new issues on files that have not been modified since long before the new code definition.
In our current analysis, sonar has done this on 2 different files.
One possible clue I can give is that the date the issue was created (14 days ago) might be the same time that I updated the definition of “New Code” (by creating a new version in the Activity tab). I am not sure about this and also it could just be a coincedence.
We are using version 5.13.0 of the sonarscanner plugin