Issues not seen in feature branch but appears after merge

I’ve a maven project with modules in java and one in typescript (angular 9.x). In the typescript analysis, I use tslint.

I’m using Sonarqube 8.2 with latest versions of plugins. I’ve configured it to push analysis results to gitlab merge request for feature branches.

Sometimes, the report (quality gate) is passed in the feature branch, then we are able to merge it. But after the merge, we have new issues in master. After analysis, we saw that the issue was already present in feature branch but was not detected.

Hi,

Are we talking about certain rules in particular?

 
Ann

No specific rules. One time it was some tslint issues and another time if was a java issue.

I was unable to reproduce but it still arrive by time to time.

Hi,

This is going to be rather difficult to diagnose without particulars. The next time it crops up, post the details here, and we’ll go from there.

 
Ann

Hi,
Today I had the case again.

On a feature branch the class has been detected as “new code” but with no issues. Then after merge and sonar analysis on master there is an issue java:S1066 in the same class in master. And the strange things is that happened on code not modified since more than 1 year.

And with another feature branch I got the problem with 2 issues in 2 differents classes that appears only on master. In this case, issues were from rule java:S1166.

Cheers,

Raphaël

Hi Raphael,

For one of the issues, can you check the blame dates of the two ifs? Were both added/edited in the PR?

 
Ann

Hi,
By Blame dates you means the creation date of the issue ? In this case, the issue has been created at the time of the merge to master.

Raphaël

Hi,

No, I mean the date the line was last updated. You can get it by clicking in the margin:

Selection_999(047)

 
Ann

The blame feature was disabled on this project. I’ve reactivated and will see…