Be able to add/remove conditions to the quality gate without warning

Hi @vivek.reghunath ,

I’m experiencing the same situation described by @ardole and @tbutler.

I do respect and support “Clean As You Code”, however I would suggest that the warning messages are only show to users with “Project Administrators” or “Quality Gate Administrators” privileges.

Specially the warning “You added extra conditions to the ‘Clean as You Code’ quality gate, which is something we do not recommend. Review your quality gate.”. This can generate unnecesary noise among the developers.

Best,
*Oca

3 Likes

Hi @josemaria.oca ,

We understand this issue. We intend to improve the experience around the Quality Gate and Clean as You Code in upcoming versions of SonarQube.

1 Like

I fully support the principles around Clean as you code. However we are getting a lot of questions from developers regarding the constant warning regarding the quality gate.
In our organization we have many projects and sometimes it is needed to set different gates than what is being recommended. I think the message is causing a lot of unnecessary noise. And that there should be a way to disable it.

4 Likes

@Rebse

You’re right. It does sound harsher than I intended. This particular issue definitely annoys me, however. I can accept recommendations and advice with no problem. I am, after all, finally responsible for either taking or not taking them to heart. However, when someone starts forcing me to follow their methodology, whether I agree with it or not, that becomes a completely separate issue. For me, the ability to cheerfully ignore advice is a fundamental freedom. Yes, there may very well be consequences for it, but they fall upon me, and that’s my problem. This particular decision on the part of Sonar smacks of authoritarianism. “You should code like this because I say so! I’m the grand high poobah of all coding and I know best! Just trust me!”

Yeah, no; that’s not going to work for me.

I do join you in hoping they take the feedback, and apologize for the harshness.

Morgan

2 Likes

From having to deal with IBM software / support over years i’m used to tougher things :joy:
Sonarsource seems still down to earth and connected to the community.

If you have a feature request and good use cases chances are it may be accepted.
WRT to the ‘clean code warning desaster’ i guess it will change very soon.

The feedback has been received and understood, see

Gilbert

2 Likes

Hi, I have another use case. Recently I added the license check plugin which is essential for us. Nothing to do with “Clean as You Code”, but by activating a rule: you are not allowed to merge, if a forbidden license is introduced by a new dependency, I also get the warning. Same as many others before: This causes unnecessary discussions with the teams :wink:

1 Like

With SonarQube 10.2 we have addressed the Clean as You Code warning issue that the community pointed out.

We also understand that, although SonarQube identifies an issue with your code, you prefer to have the freedom to ignore this. We will keep in mind that our users do like their freedom to accept debt and make releases.

This doesn’t seem to be the case considering that the option to configure the severity of the rules was removed, forcing us to accept whatever Sonar decided… SQ 10.2 turn off rule severity is a breaking change

2 Likes

Hi Felipe,

Thank you for raising this concern. There’s now an answer in the thread you linked.

We are very open to hearing about users facing issues with these changes and their specific use cases. You can reply in the other thread if you have more to share.

Gab

2 Likes