Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add SonarCloud badge on GitHub?

I am trying to add SonarCloud badge to my README.

But when I do like this

![https://sonarcloud.io/dashboard?id=com.lapots.breed.judge%3Ajudge-rule-engine](https://sonarcloud.io/api/project_badges/measure?project=com.lapots.breed.judge%3Ajudge-rule-engine&metric=alert_status)

The badge itself looks fine but it does not allow to go to sonarcloud project and instead leads to camo.githubusercontent.com.

Which link should I use to access the SonarCloud project?

Thanks.

like image 293
lapots Avatar asked Mar 02 '18 09:03

lapots


2 Answers

You can use this link to access SonarCloud project directly:

https://sonarcloud.io/dashboard?id=Project_Key_Here

Alternatively, you could access your SonarCloud badge via following steps:

  1. Open your SonarCloud project
  2. Click Get project badges button SonarCloud project
  3. Copy the badge link based on your selection on Metric and Format Badge
like image 105
Jerry Chong Avatar answered Oct 21 '22 03:10

Jerry Chong


The markdown syntax for an image with link is

[![<image title>](<image url>)](link url)

So, try:

[![Sonarcloud Status](https://sonarcloud.io/api/project_badges/measure?project=com.lapots.breed.judge:judge-rule-engine&metric=alert_status)](https://sonarcloud.io/dashboard?id=com.lapots.breed.judge:judge-rule-engine)
like image 27
Flopp Avatar answered Oct 21 '22 02:10

Flopp