Accepted issues "forgotten" after git rebase

Hello,

On a pull request, I “resolved” some issues.
Meanwhile, a coworker merged his own PR on the target branch.
So I locally updated to target branch, rebased my branch on it, pushed my branch, and relaunched a Sonar analysis on my PR.
Then, the issues I previously accepted come back.

Hey @Oodini

I can’t reproduce this on my end. After a git rebase, my issues stay in the “accepted” status.

Could you give us some more details to reproduce the issue?

It seems that’s because the target branch has not been analyzed after the MR of my co-worker.
Could that explain the problem ?

Thanks @oodni, and apologies for the delayed response.

That could explain things – SonarQube Cloud can indeed fail to detect new lines (and new vs. old issues) if the target branch isn’t reanalyzed, which is especially obvious when the first analysis of a repo happens via a pull request.

However, despite numerous attempts, I haven’t been able to reproduce this locally with a rebase. The issues remain closed in my sample PRs.