The enhancement has milestone ‘9.3’ and was merged in May 2022, so I expect it is in my version 9.9 but requires in js code are still being flagged as duplicate code, causing my github PR to fail SonarQube Quality Gate.
Hopefully I am missing something obvious because it would make a big difference to acceptance of SonarQube in my company. Appreciate any help / pointers.
My understanding is that you are right, the version of the analyzer included in SonarQube v9.9 should exclude these statements from duplication detection.
Just to ask the dumb question first – have you reanalyzed your project since upgrading to SonarQube v9.9 LTS?
Yes, above image is from a recent analysis with SonarQube v9.9.
SonarQube scan is integrated into our build pipeline, run multiple times per day.
We have been on v9.9 for quite a while (months).
FYI, the change in the PR for the above image was changing the requires from ‘var’ to ‘const’.