How to calculate % of compliant code and coverage based on report?

Based on SonarQube scan report, how can I calculate the % of compliant code for a project based on overall code scanned, based on vulnerabilities, security hotspots, code smells and bugs.

Current report is showing Coverage is 0.0% what does that mean?
What are the different ways to calculate coverage and code compliance % based on above given data from the report?


Coverage is a test metric.

I don’t know how you would calculate the percentage of “compliant” code. That would need to start from a definition of “compliant”.