Hi community! We are facing are problem during onboarding of our projects into sonarcloud,
My team found it confusing to not been able to setup quality gates on “new code” with condition specifically to ESlint reports code smells.
Example: New pull request has 2 new eslint errors and 1 new sonar issue i would like to setup rule “No new eslint errors” for quality gate pass
The only way i could do it right now is to disable all sonarcloud rules ?
Does it possible to split external generated issues from code smells somehow ?
Welcome to the community!
Quality Gate conditions are based on metrics, and we don’t calculate metrics based on rule/issue origin.
I’m curious though, why you would apply a stricter standard for ESLint rules than for native SonarCloud rules…?
For example: during project onboarding
We had classic CI/CD for our projects Bitbucket PR → Webhook → Jenkins Pipeline → Code scan
Code scan include ESlint report and Sonarscanner.
Previously we had only eslint and if we had anything major in report we fail pipeline and then block PR merge (bitbucket condition on failed build)
Once sonarcloud comes we understood that it would be great to have Quality gate to block PR merge but it takes time until devs understood all the rules. So even now with sonarcloud we keep failing pipeline base on eslint report.
From devops perspective i am not sure why pipeline should finish with error code, because build was successful.
From dev perspective i could see eslint in PR decoration and issues but cannot have any metric on it