Sonar-maven-plugin enable only coverage checks and no other analysis rule

I am using sonar-maven-plugin with Sonar Qube Cloud in a multi-module maven project having java and scala code with jacoco.

Can someone let me know if there is a way for me to disable all sonar scanner rules in pom except for PR diff coverage gate?

Hi,

I don’t understand what you want to retain.

 
Ann

I want to only retain “New Code has sufficient test coverage”. Please check the attached screenshot.

So I just want sonar-maven-plugin to send only the jacoco report and other relevant files needed for this quality gate and skip all other sonar analysis the plugin may be doing.

(attachments)

Hi,

So the only thing you want to check on a PR is whether it has sufficient test coverage? No coding rules? The only way to do that would be to assign the project as a whole an empty quality profile. One for each language in the project. But since the same profiles are used for all scans on a project, that means your main branch scans would be rule-less too.

Would you help me understand why you don’t care about catching rule violations (bugs and vulnerabilities) in PRs?

 
Thx,
Ann