badges / badges/shields

Enhance Sonar Badges

Open
#3,236 0 comments 3 reactions 0 assignees View on GitHub
good first issue service-badge
Dominant language
JavaScript
Stars
27.2k
Forks
5.6k
Avg merge
1d 8h
Merged PRs (30d)
46

Description

:clipboard: **Description**
We currently provide what I'll call "first class" badge support for a handful of Sonar metrics (code coverage, tech debt, violations, fortify rating, and documented api density).

However, Sonar provides a lot of other metrics (see: https://docs.sonarqube.org/latest/user-guide/metric-definitions/), and the SaaS offering of Sonar (https://sonarcloud.io/about) provides native badges for many of those other metrics.

We _technically_ have badge support for all of those other metrics too, but it's what I'll call "second class" support where we simply display a ~~brightgreen badge~~ blue badge with the raw value (updated to reflect the change in the Sonar refactor in #3189).

For example, here's the native Sonar badge for security rating:
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=com.luckybox%3Aluckybox&metric=security_rating)](https://sonarcloud.io/dashboard?id=com.luckybox%3Aluckybox) <-- (live badge)
![image](https://user-images.githubusercontent.com/13042488/54964712-7a98a680-4f3b-11e9-9287-33129c87bd92.png) <-- (bad screenshot I took to capture the state in case the underlying score changes)

And here's our corresponding badge for the exact same metric (https://img.shields.io/sonar/https/sonarcloud.io/com.luckybox:luckybox/security_rating.svg)
![](https://img.shields.io/sonar/https/sonarcloud.io/com.luckybox:luckybox/security_rating.svg)

Let's add similar "first class" badge support for those other core Sonar metrics!

Contributor guide

Open the contributing guide

Research direction

Review the existing first-class Sonar badge support and compare it with Sonar's metric definitions and native badges. The issue names no source files or tests, so first identify the relevant badge entry points and test coverage. Done means the selected additional core metrics have equivalent first-class badge behavior and tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.