2 Star 0 Fork 0

mirrors_sourcegraph/sourcegraph-sonarqube

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

SonarQube Sourcegraph extension

⚠️ Deprecation notice

Sourcegraph extensions have been deprecated with the September 2022 Sourcegraph release. Learn more.

The repo and the docs below are kept to support older Sourcegraph versions.

Description

Show SonarQube issues when browsing files on Sourcegraph.

Screenshot

➡️ Try it out on github.com/apache/struts

You can toggle decorations with the SonarQube button in the action toolbar. Each decoration links to the issue on SonarQube.

Configuration

The extension can be configured through JSON in user, organization or global settings.

{
  // Configure the extension to use a private SonarQube instance.
  // By default, Sonarcloud is used.
  "sonarqube.instanceUrl": "https://sonarcloud.io/",
  // An API token to the SonarQube instance, if needed.
  "sonarqube.apiToken": "...",

  // The SonarQube extension needs to map the repository on Sourcegraph to a project inside an organization on
  // SonarQube. The default settings work for most projects on SonarCloud, but if you have a custom setup, you
  // can configure the following settings.

  // This regular expression is matched on the repository name. The values from the capture groups are
  // available in the templates below.
  "sonarqube.repositoryNamePattern": "(?:^|/)([^/]+)/([^/]+)$",
  // This template is used to form the SonarQube organization key.
  // By default, the second-last part of the repository name (first capture group above) is used as-is.
  // E.g. "apache" from "github.com/apache/struts".
  "sonarqube.organizationKeyTemplate": "$1",
  // This template is used to form the SonarQube project key.
  // By default, the second-last and last part of the repository name (first and second capture groups above)
  // are joined by an underscore.
  // E.g. "apache_struts" from "github.com/apache/struts".
  "sonarqube.projectKeyTemplate": "$1_$2",

  // CORS headers are necessary for the extension to fetch data, but SonarQube does not send them by default.
  // Here you can customize the URL to an HTTP proxy that adds CORS headers.
  // By default Sourcegraph's CORS proxy is used.
  // Set this to `null` to opt out of using a CORS proxy.
  "sonarqube.corsAnywhereUrl": "https://cors-anywhere.sgdev.org"
}

Limitations

The current commit viewed on Sourcegraph may not be analyzed on SonarQube. If that is the case, the extension will fallback to the latest analysis available on SonarQube on the default branch. This may result in decorations being off in some files if those files differ between the commit being viewed and the one analyzed on SonarQube.


SONARQUBE is a trademark belonging to SonarSource SA.

空文件

简介

Show Sonarqube issues when browsing files on Sourcegraph 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_sourcegraph/sourcegraph-sonarqube.git
git@gitee.com:mirrors_sourcegraph/sourcegraph-sonarqube.git
mirrors_sourcegraph
sourcegraph-sonarqube
sourcegraph-sonarqube
main

搜索帮助