|
1 | 1 | { |
2 | | - "$schema": "https://raw.githubusercontent.com/sourcegraph/sourcegraph/master/shared/src/schema/extension.schema.json", |
| 2 | + "$schema": "https://raw.githubusercontent.com/sourcegraph/sourcegraph/main/client/shared/src/schema/extension.schema.json", |
3 | 3 | "name": "sonarqube", |
4 | | - "description": "", |
| 4 | + "description": "Show Sonarqube issues when browsing files on Sourcegraph", |
5 | 5 | "publisher": "sourcegraph", |
| 6 | + "icon": "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3E%3Cdefs/%3E%3Crect width='512' height='512' fill='%23549dd0'/%3E%3Cdefs%3E%3Crect id='a' y='0' width='512' height='512'/%3E%3C/defs%3E%3CclipPath id='b'%3E%3Cuse xlink:href='%23a' overflow='visible'/%3E%3C/clipPath%3E%3Cpath d='M409 448h-22c0-179-148-325-330-325v-22c194 0 352 155 352 347' clip-path='url(%23b)' fill='%23fff'/%3E%3Cg%3E%3Cdefs%3E%3Crect id='c' y='0' width='512' height='512'/%3E%3C/defs%3E%3CclipPath id='d'%3E%3Cuse xlink:href='%23c' overflow='visible'/%3E%3C/clipPath%3E%3Cpath d='M424 329A335 335 0 00192 89l5-18a354 354 0 01245 253l-18 5z' clip-path='url(%23d)' fill='%23fff'/%3E%3C/g%3E%3Cg%3E%3Cdefs%3E%3Crect id='e' y='0' width='512' height='512'/%3E%3C/defs%3E%3CclipPath id='f'%3E%3Cuse xlink:href='%23e' overflow='visible'/%3E%3C/clipPath%3E%3Cpath d='M441 223c-27-60-74-113-132-148l8-12c60 36 109 91 138 154l-14 6z' clip-path='url(%23f)' fill='%23fff'/%3E%3C/g%3E%3C/svg%3E", |
6 | 7 | "activationEvents": [ |
7 | 8 | "*" |
8 | 9 | ], |
9 | | - "wip": true, |
10 | | - "categories": [], |
11 | | - "tags": [], |
| 10 | + "wip": false, |
| 11 | + "categories": [ |
| 12 | + "External services" |
| 13 | + ], |
| 14 | + "tags": [ |
| 15 | + "Sonarqube" |
| 16 | + ], |
12 | 17 | "contributes": { |
13 | | - "actions": [], |
| 18 | + "actions": [ |
| 19 | + { |
| 20 | + "id": "sonarqube.showIssuesOnCodeViews.toggle", |
| 21 | + "command": "updateConfiguration", |
| 22 | + "commandArguments": [ |
| 23 | + [ |
| 24 | + "sonarqube.showIssuesOnCodeViews" |
| 25 | + ], |
| 26 | + "${!(config.sonarqube.showIssuesOnCodeViews !== false)}", |
| 27 | + null, |
| 28 | + "json" |
| 29 | + ], |
| 30 | + "title": "${get(context, 'sonarqube.errorMessage') || (config.sonarqube.showIssuesOnCodeViews && \"Hide inline Sonarqube issues\" || \"Show inline Sonarqube issues\")}", |
| 31 | + "category": "Sonarqube", |
| 32 | + "actionItem": { |
| 33 | + "description": "${get(context, 'sonarqube.errorMessage') || (config.sonarqube.showIssuesOnCodeViews && \"Hide inline Sonarqube issues\" || \"Show inline Sonarqube issues\")}", |
| 34 | + "iconURL": "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 512 512'%3E%3Cdefs/%3E%3Crect width='512' height='512' fill='%23${get(context, 'sonarqube.errorMessage') && \"999\" || \"549dd0\"}'/%3E%3Cdefs%3E%3Crect id='a' y='0' width='512' height='512'/%3E%3C/defs%3E%3CclipPath id='b'%3E%3Cuse xlink:href='%23a' overflow='visible'/%3E%3C/clipPath%3E%3Cpath d='M409 448h-22c0-179-148-325-330-325v-22c194 0 352 155 352 347' clip-path='url(%23b)' fill='%23fff'/%3E%3Cg%3E%3Cdefs%3E%3Crect id='c' y='0' width='512' height='512'/%3E%3C/defs%3E%3CclipPath id='d'%3E%3Cuse xlink:href='%23c' overflow='visible'/%3E%3C/clipPath%3E%3Cpath d='M424 329A335 335 0 00192 89l5-18a354 354 0 01245 253l-18 5z' clip-path='url(%23d)' fill='%23fff'/%3E%3C/g%3E%3Cg%3E%3Cdefs%3E%3Crect id='e' y='0' width='512' height='512'/%3E%3C/defs%3E%3CclipPath id='f'%3E%3Cuse xlink:href='%23e' overflow='visible'/%3E%3C/clipPath%3E%3Cpath d='M441 223c-27-60-74-113-132-148l8-12c60 36 109 91 138 154l-14 6z' clip-path='url(%23f)' fill='%23fff'/%3E%3C/g%3E%3C/svg%3E", |
| 35 | + "pressed": "config.sonarqube.showIssuesOnCodeViews" |
| 36 | + } |
| 37 | + } |
| 38 | + ], |
14 | 39 | "menus": { |
15 | | - "editor/title": [], |
| 40 | + "editor/title": [ |
| 41 | + { |
| 42 | + "action": "sonarqube.showIssuesOnCodeViews.toggle", |
| 43 | + "when": "resource" |
| 44 | + } |
| 45 | + ], |
16 | 46 | "commandPalette": [] |
17 | 47 | }, |
18 | | - "configuration": {} |
| 48 | + "configuration": { |
| 49 | + "type": "object", |
| 50 | + "properties": { |
| 51 | + "sonarqube.showIssuesOnCodeViews": { |
| 52 | + "description": "Whether to show Sonarqube issues inline on code views.", |
| 53 | + "type": "boolean", |
| 54 | + "default": true |
| 55 | + }, |
| 56 | + "sonarqube.instanceUrl": { |
| 57 | + "description": "The URL to the Sonarqube instance.", |
| 58 | + "type": "string", |
| 59 | + "default": "https://sonarcloud.io/" |
| 60 | + }, |
| 61 | + "sonarqube.apiToken": { |
| 62 | + "description": "The API authentication token for the Sonarqube instance, if needed.", |
| 63 | + "type": "string" |
| 64 | + }, |
| 65 | + "sonarqube.corsAnywhereUrl": { |
| 66 | + "description": "The URL to a CORS proxy.", |
| 67 | + "type": "string", |
| 68 | + "default": "https://cors-anywhere.herokuapp.com" |
| 69 | + }, |
| 70 | + "sonarqube.repositoryNamePattern": { |
| 71 | + "description": "Regular expression with that is matched on the repository name to extract the capture groups for organization and project key templates.", |
| 72 | + "type": "string", |
| 73 | + "format": "regex", |
| 74 | + "default": "(?:^|/)([^/]+)/([^/]+)$" |
| 75 | + }, |
| 76 | + "sonarqube.organizationKeyTemplate": { |
| 77 | + "description": "Replace string to build the organization key from the repository name pattern, using $n references for capture groups. By default just uses the first capture group", |
| 78 | + "type": "string", |
| 79 | + "default": "$1" |
| 80 | + }, |
| 81 | + "sonarqube.projectKeyTemplate": { |
| 82 | + "description": "Replace string to build the project key from the repository name pattern, using $n references for capture groups.", |
| 83 | + "type": "string", |
| 84 | + "default": "$1_$2" |
| 85 | + } |
| 86 | + } |
| 87 | + } |
19 | 88 | }, |
20 | 89 | "version": "0.0.0-DEVELOPMENT", |
21 | 90 | "license": "Apache-2.0", |
22 | 91 | "main": "dist/sonarqube.js", |
| 92 | + "repository": { |
| 93 | + "type": "git", |
| 94 | + "url": "https://github.com/sourcegraph/sourcegraph-sonarqube" |
| 95 | + }, |
23 | 96 | "scripts": { |
24 | 97 | "eslint": "eslint 'src/**/*.ts'", |
25 | 98 | "typecheck": "tsc -p tsconfig.json", |
26 | | - "build": "parcel build --out-file dist/sonarqube.js src/sonarqube.ts", |
| 99 | + "build": "parcel build --out-file dist/sonarqube.js src/sonarqube.ts --no-minify", |
27 | 100 | "symlink-package": "mkdirp dist && lnfs ./package.json ./dist/package.json", |
28 | 101 | "serve": "yarn run symlink-package && parcel serve --no-hmr --out-file dist/sonarqube.js src/sonarqube.ts", |
29 | 102 | "watch:typecheck": "tsc -p tsconfig.json -w", |
|
45 | 118 | "parcel-bundler": "^1.12.4", |
46 | 119 | "sourcegraph": "^24.7.0", |
47 | 120 | "typescript": "^4.0.3" |
| 121 | + }, |
| 122 | + "dependencies": { |
| 123 | + "rxjs": "^6.6.3" |
48 | 124 | } |
49 | 125 | } |
0 commit comments