Our scan on main branch is showing issues for code that has not been touched in a long time, which is causing the quality gate to fail. No configuration was changed and things were working correctly on previous scans.
We have a hunch about what’s going on, and it relates to this change the other day:
SonarCloud is usually quite good at recognizing new files and making sure the issues that are raised get backdated properly. But when a file has been indexed by SonarCloud but not analyzed, this doesn’t work. So when we introduce a change that expands the scope of what files are analyzed in the set of previously indexed files, issues aren’t backdated.
This obviously isn’t ideal, and there’s no reasonable workaround to recommend right now. It comes in other flavors as well (when a first analysis is run without NodeJS installed, JS/TS/CSS files are indexed but not analyzed. When this is fixed, those files aren’t considered new and issues aren’t backdated).
I’ve flagged this internally to see what, if anything, should be done next… and, a lot of us are about to be on holiday. So bear with us. Thanks for raising it here.