New SonarCloud quality rules

Hi devs,

Currently our quality gate on sonarcloud is: no blocker issues on new code.

However there are 2 topics to discuss:

  1. Sonarqube doesn’t use the concept of blocker issues anymore. They now have High, Medium, Low. Their mapping is defined at Issues (High = the old blocker + critical)

  2. They have introduced the concept of “Clean as you code” which they’re proposing to set up as a quality gate with the following rules:

I’m proposing to follow it (it’s on new code only), and to keep the 80% coverage and 3% duplicated lines proposed. Note that it’s always possible to set a rule as a false positive (in case that for some reason the test coverage is badly measured for example, hopefully that shouldn’t happen soon and if it does then we can review our rule).

WDYT?

If you’re worried, we could also decide to test this for 1 month and decide if we keep it or not after that test period.

Thanks

PS1: If you want to see all the High rules: SonarCloud

PS2: We currently have 3 high severity issues on new code for platform: SonarCloud

There’s also 1 in commons: SonarCloud

And 1 in rendering: SonarCloud

80% sounds a lot for some cases, but let’s try

Fixed

+1 to try it out

Fixed

Would be good if some javascript expert could validate the 2 issues related to javascript (let vs var).

They are definitely valid. New JavaScript code shouldn’t use var any more (normally). I saw @CharpentierLucas was assigned to these two issues, so I assumed he’s taking care of it. I don’t know how this assignment is done. Maybe it’s automatic (based on who committed the code) and @CharpentierLucas is not aware of it? Otherwise, I can fix it quickly.

Yeah it was assigned automatically and it did not ping me ^^’ . I can check it out after lunch

Thank you for notifying me :slight_smile:

PS: I changed my notification parameters so that hopefully a similar situation wouldn’t happen again

1 Like