I’ve setup a customised quality gate which fails if number of code smells is greater than 0.
Following is an example of such a failure.
It shows green icon beside the code smells. Is there a way to change it to red?
I’ve setup a customised quality gate which fails if number of code smells is greater than 0.
Following is an example of such a failure.
It shows green icon beside the code smells. Is there a way to change it to red?
Hello,
This is a normal behavior, this green icon is related to the maintainability rating which is usually pretty good (A) if you only have 1 code smell. It will switch to red if the rating is bad (E).
So no, for now there is now way to change this and I don’t think we plan to support such use case.
Thanks for answering. Where can I find the formula used for evaluating rating in terms of A, E, etc?
My concern is that developers still are able to push few code smells per PR (as the rating is still A) which I think shouldn’t be allowed.
You can find the details of how this rating is calculated in our page about metric definitions.
And that’s a valid concern, that’s why you can still prevent the merge by changing your quality gate conditions to be stricter than the default. But it doesn’t change the fact that the rating will stay A, and an A rating’s color is green.
On the other hand what we plan to do, and might actually answer your concern, is to make it more visible that the Quality Gate is failed in this specific case where you have custom conditions.
It would look kind of like this:
(but with the metrics still on four lines like in your screenshot)
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.