Then a new code Leak Period in "Overview" tab, but no any change,redo analysis, Leak become 0

At first analysis result is new code Leak Period in “Overview” tab.And the Quality gate is Red.


But no any change, only Re analysis, Leak become 0. And the Quality gate is became Green.

How to prevent this .

Hi,

First, kudos on your mouse-writing. I know from experience how difficult that is. :smile:

What is your Leak Period set to on the project? And to verify, on second analysis everything else stayed the same? Same number of lines of code, overall bugs, &etc?

Ann

1 Like

Hi Ann, thanks for the reply.
I think I made a low grade mistake. My ‘Leak Period’ is the '‘previous_version’, so that’s why it happens. I tried to adjust the ‘Leak Period’ to 7, I got the desired result.
And, do you have more recommended about best practice for ‘Leak Period’ setup.
Thank you so much. Have a nice weekend!

1 Like

Hi,

Our recommended best practice is to set it based on versions. That’s fairly easy and natural if you’re using something like Maven for your build system. Less so with other build systems, but perhaps worth it because it allows you to keep an eye on changes since last release so you’re sure you’re not putting new problems into production. With a number-of-days leak period, if you introduce a new problem, you could cheat the system by just waiting for it to age out.

If a version-based leak isn’t feasible, then date-based might be the next-best alternative.

 
HTH,
Ann

Hi Ann, Thanks for the reply