我有com.github.xxxxxx:xxxxxx Maven存储库,我想添加盾牌徽章,但我的徽章无效:
https://img.shields.io/sonar/https/sonarqube.com/com.github.noraui:noraui/tech_debt.svg
Sonarqube xxxxxx项目页面:https://sonarqube.com/dashboard?id=com.github.xxxxxx%3Axxxxxx
我从其他声纳服务器找到了一个OK示例:
https://img.shields.io/sonar/http/sonar.qatools.ru/ru.yandex.qatools.allure:allure-core/coverage.svg
答案 0 :(得分:3)
现在,我不使用http://shields.io,而是直接使用https://sonarcloud.io网站。
[![Quality Gate](https://sonarcloud.io/api/badges/gate?key=com.github.noraui:noraui)](https://sonarcloud.io/dashboard/index/com.github.noraui:noraui)
[![SonarCloud Coverage](https://sonarcloud.io/api/badges/measure?key=com.github.noraui%3Anoraui&metric=coverage)](https://sonarcloud.io/component_measures/metric/coverage/list?id=com.github.noraui:noraui)
[![SonarCloud Bugs](https://sonarcloud.io/api/badges/measure?key=com.github.noraui%3Anoraui&metric=bugs)](https://sonarcloud.io/component_measures/metric/reliability_rating/list?id=com.github.noraui%3Anoraui)
[![SonarCloud Vulnerabilities](https://sonarcloud.io/api/badges/measure?key=com.github.noraui%3Anoraui&metric=vulnerabilities)](https://sonarcloud.io/component_measures/metric/security_rating/list?id=com.github.noraui%3Anoraui)
答案 1 :(得分:2)
答案 2 :(得分:1)
我刚发现这个问题,因为我也试图从sonarqube获取徽章(在我的情况下是sonarcloud)。
徽章有嵌入式API。 这是官方文档(我有时间在谷歌上找到它):https://next.sonarqube.com/sonarqube/web_api/api/badges
遗憾的是,http://shields.io不再与sonarqube合作。
答案 3 :(得分:1)
SonarCloud.io将API更改为这些URL
https://sonarcloud.io/api/project_badges/quality_gate?project=WcfSoapLogger&branch=master
https://sonarcloud.io/api/project_badges/measure?project=WcfSoapLogger&metric=code_smells
答案 4 :(得分:1)
[![Sonarcloud Status](https://sonarcloud.io/api/project_badges/measure?project=metamug_mason&metric=alert_status)](https://sonarcloud.io/dashboard?id=metamug_mason)
[![SonarCloud Coverage](https://sonarcloud.io/api/project_badges/measure?project=metamug_mason&metric=coverage)](https://sonarcloud.io/component_measures/metric/coverage/list?id=metamug_mason)
[![SonarCloud Bugs](https://sonarcloud.io/api/project_badges/measure?project=metamug_mason&metric=bugs)](https://sonarcloud.io/component_measures/metric/reliability_rating/list?id=metamug_mason)
[![SonarCloud Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=metamug_mason&metric=vulnerabilities)](https://sonarcloud.io/component_measures/metric/security_rating/list?id=metamug_mason)
答案 5 :(得分:1)
https://github.com/030/nexus3-cli
[![Build Status](https://travis-ci.org/030/nexus3-cli.svg?branch=master)](https://travis-ci.org/030/nexus3-cli)
[![Go Report Card](https://goreportcard.com/badge/github.com/030/nexus3-cli)](https://goreportcard.com/report/github.com/030/nexus3-cli)
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=030_nexus3-cli&metric=bugs)](https://sonarcloud.io/dashboard?id=030_nexus3-cli)
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=030_nexus3-cli&metric=code_smells)](https://sonarcloud.io/dashboard?id=030_nexus3-cli)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=030_nexus3-cli&metric=coverage)](https://sonarcloud.io/dashboard?id=030_nexus3-cli)
[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=030_nexus3-cli&metric=duplicated_lines_density)](https://sonarcloud.io/dashboard?id=030_nexus3-cli)
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=030_nexus3-cli&metric=ncloc)](https://sonarcloud.io/dashboard?id=030_nexus3-cli)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=030_nexus3-cli&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=030_nexus3-cli)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=030_nexus3-cli&metric=alert_status)](https://sonarcloud.io/dashboard?id=030_nexus3-cli)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=030_nexus3-cli&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=030_nexus3-cli)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=030_nexus3-cli&metric=security_rating)](https://sonarcloud.io/dashboard?id=030_nexus3-cli)
[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=030_nexus3-cli&metric=sqale_index)](https://sonarcloud.io/dashboard?id=030_nexus3-cli)
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=030_nexus3-cli&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=030_nexus3-cli)
目前似乎有11个徽章。