Topic on Talk:Continuous integration/Codehealth Pipeline

Bot recommending ES6 syntax

11
ESanders (WMF) (talkcontribs)
KHarlan (WMF) (talkcontribs)

Yeah I don't think SonarQube can grok projects with both ES5 and ES6. @JBranaa (WMF) I think we should disable this particular rule.

Daimona Eaytoy (talkcontribs)

I've never noticed this before, but now it seems to be suggesting var -> let / const, too. All those comments are very annoying because they take up a lot of space, see e.g. here. Could we at least make it validate the code against ES5 by default?

KHarlan (WMF) (talkcontribs)

Ping @JBranaa (WMF) as QTE are maintainers of this tool. Maybe a phab task is helpful for visibility and triaging?

KHarlan (WMF) (talkcontribs)
Daimona Eaytoy (talkcontribs)

@KHarlan (WMF): For some reason, it got worst... Now it seems to be complaining about pretty much everything, including wild things like "25 more comment lines need to be written to reach the minimum threshold of 25.0% comment density", unwanted stuff ("Replace all tab characters in this file by sequences of white-spaces.") and puzzling suggestions ("Unexpected string concatenation."). See here for an example.

KHarlan (WMF) (talkcontribs)

@Daimona Eaytoy, ugh, sorry. I am not sure how it happened, but "Extending" the default profile somehow... added a bunch of rules? It went from 209 to 275 rules. I reverted back to the "Sonar way" profile, which means the "var let" business is back. :( I (or QTE who maintain this tool) will have to try another time.

JBranaa (WMF) (talkcontribs)

Sorry for the delay on this. Please submit a phab task for for this and tag it quality-and-test-engineering and we'll take a look at it.

JBranaa (WMF) (talkcontribs)
Matma Rex (talkcontribs)
PWangai-WMF (talkcontribs)

I have confirmed the "Unexpected var, use let or const instead." rule has been disabled for both Javascript and Typescript. Incase anyone encounters more ES6 syntax issues kindly let me know.

Reply to "Bot recommending ES6 syntax"