Custom sonar quality gates configuration issue

Hello Team,

When I try to create custom quaity gates, it automaticaly adds the default conditions and tells me to remove them with below error:

Extra conditions are not recommended
You added extra conditions to the “Clean as You Code” quality gate, which is something we do not recommended

I created a custom quality gate with name testqualitygates. When I add qualty gate condition on overall code, it shows below warning:

I am using sonarqube version ->9.9.4.87374

Kindly provde assistance in resolving this issue ?

Thanks,
Shantanu

Hi Shantanu,

Welcome to the community!

That’s just an informational box. You can safely ignore it.

 
HTH,
Ann

Hi Ann,

Many thanks for your reply.

Condering this as warning, we tried to run pieplie again but its failed with code smell error. Upon checking further, the code smell error suggest to add a new condition

SpringBootTest
class DockerSpringBootApplicationTests {
Test
void contextLoads() {
Add at least one assertion to this test case.
}
}

If i use default Quality Gate Conditions (Sonar Way) then all Conditions Passed.

The main goal is to add custom quality gates conditions instead of Default Conditions.

If i remove default conditions from my custom Quality Gates then the Portal dosen’t allow me to save my own custom Quality Gate,

Best Regards,

Shantanu

Hi Shantanu,

There’s a lot going on here. I’d like to focus on this:

I’ve just tested in 10.6, and:

  • I was able to create a new Quality Gate from scratch
  • Default conditions on New Code were added automatically
  • I was successfully able to delete them

The 9.9 implementation was overly pedantic, and has since been relaxed.

I suggest you upgrade to the latest version, 10.6, and go from there.

 
HTH,
Ann

Hello Team,

When I try to create custom quaity gates, it automaticaly adds the default conditions and tells me to remove them with below error:

Extra conditions are not recommended
You added extra conditions to the “Clean as You Code” quality gate, which is something we do not recommended

I created a custom quality gate with name testqualitygates. When I add qualty gate condition on overall code, it shows below warning:

Condering this as warning, we tried to run pieplie again but its failed with code smell error. Upon checking further, the code smell error suggest to add a new condition

SpringBootTest
class DockerSpringBootApplicationTests {
Test
void contextLoads() {
Add at least one assertion to this test case.
}
}

If i use default Quality Gate Conditions (Sonar Way) then all Conditions Passed.

The main goal is to add custom quality gates conditions instead of Default Conditions.

If i remove default conditions from my custom Quality Gates then the Portal dosen’t allow me to save my own custom Quality Gate,

I am using sonarqube version ->9.9.4.87374

Kindly provde assistance in resolving this issue ?

Thanks,
Shantanu

Hi again Shantanu,

I’ve moved your new thread into this one because you’ve created a new thread which is largely identical to your last post in this thread. We try to keep it to one topic per thread, otherwise it gets messy, fast. The corollary to that is one thread per topic.

Please don’t post the same thing in multiple places.

And BTW, what your screenshot shows is - again - an informational message, not even a warning.

 
Ann