Raised issues on old code

Currently, we are facing a blocked build process in Sonar due to issues raised in old files.

There is no change to those old files, and the change log in the quality profile doesn’t show any change related to that rule.

1 Like

Hi,

From your screenshot, the issues are correctly dated. Can you share what condition is failing here? A screenshot of your failed Quality Gate would help.

 
Thx,
Ann

Hi,

The date seems to be correct.

It’s failed due to a critical finding. We doesn’t allow any critical finding in source code.

Hi,

Could you share a screenshot of the failing Quality Gate, please?

 
Thx,
Ann

We need to bypass the issues to unlock deployment, so we currently don’t have the failed Quality Gate screenshot.

Hi,

Sorry, but there’s not a lot to go on to help you debug this.

 
Ann

Is there any additional information that could help?
We need to bypass this finding to unblock the development process, as the issues mentioned above originate from the failed gate. Then currently, there is no screenshot for that failed gate

Hi,

I’m confused.

Is the Quality Gate currently in failed status or not? If it is currently in failed status, then taking a screenshot and posting it here should be fairly simple. If it’s not, then… you’ve already done the bypass?

 
Ann

The issues were bypassed. But I need to understand why it happened.

Hi,

And to help you understand that, I really need a better understanding of what condition failed.

 
Ann

As I mentioned before, the critical issues were raised in the old code. And our quality gate will be failed if there is any high or critical issues.

Hi,

If this recurs, please post a screenshot, and we can investigate.

 
Ann

It’s happened again. In the PR, there is no change in that file.

Hi,

Thanks for the screenshots. Based on this, everything looks correct to me.

Your first screenshot indicates that the New Code Period started 12 days ago.

And your issue is dated 3 days ago, which falls well into the New Code Period.

 
Ann

a lot of PRs were merged successfully, and the latest PR doesn’t touch that file

Hi,

Okay, so the concern is that the Quality Gate was green until the most recent PR was merged, and only after that last merge - which didn’t touch the file in question - did that issue cause the Quality Gate to fail?

You’ve obscured part of the message in the issue screenshot (which is fine) so it’s difficult for me to tell, but I think it references a different class name? Did that class change recently?

 
Ann

It causes the quality gate to fail. And there has been no change recently related to that file or that class.

Hi,

Can you provide the log from the analysis of the PR and from the analysis of the branch?

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them.

 
Thx,
Ann