Can sonarQube show method coverage from jacoco reports? And why sonar ignores method coverage?

I want to acquire method coverage of my project.
But i can not find any way to achieve it.
How can i use method coverage as a condition of quality gate?
And why we only use line coverage and condition coverage in quality gate?

Hey there.

SonarQube calculates line coverage and branch coverage, but that’s it.

What language(s) are you analyzing and what coverage tools are you using?

Java with jacoco

so can we use method coverage as a condition of quality gate?or show it in web ui?

SonarQube collects line and condition coverage, but it does not consider method coverage. To be honest, it’s not something we’ve been asked for very much.

Why do you prefer this coverage metric over others?