- SonarQube 7.2.1 Enterprise with VSTS (C#)
- Issues not resolved/re-opened despite the fix being implemented. Snippet displays old code. No errors displayed
Steps to Reproduce
- Run initial scan on master branch
- Run scan on Develop Branch (Long-living branch)
- Run scan on feature branch (short-living branch) - 2 new issues reported
- Make suggested changes to VSTS/Git feature branch
- Mark the 2 issues as resolved in SonarQube
- Run second scan on feature branch
- Issues in SonarQube are marked Re-Opened. Viewing the snippet in SonarQube displays code from the initial scan. It is as if SonarQube doesn’t recognize the changed code even though I confirmed the code in the short-living branch has been updated.
We have a Master branch that is being analyzed. There are MANY issues on the Master branch. There is a branch off of Master called Develop. Both of these branches are long-lived branches and in sync.
Off of Develop, I have a short-lived branch called “feature/pfemp”. We modified this branch. 2 issues were returned when this branch was scanned after modification.
We created a new branch off of feature/pfemp called pbi/12345. We resolved these two issues in this new branch and created a Pull Request to merge the changes into feature/pfemp. A scan ran on the Pull Request and returned 0 new issues.
We then ran a new scan against feature/pfemp, but the issues in SonarQube are still being displayed. When I click into them, I see a snippet of the code before we made the fix. When I look at the code that is in feature/pfemp, I see the updated code. I then tried marking the issues as fixed. Re-ran the scan, and the issues were updated to Reopened. So it seems like SonarQube is not picking up that the code changed, even though it has.