diff options
| author | Thomas Schmucker <ts@its1.de> | 2026-03-25 07:08:57 +0100 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2026-03-25 07:08:57 +0100 |
| commit | e99756d1d5acb6805003b403985ee0a2a253bf26 (patch) | |
| tree | 7dac1f53da9f2f231d4457dd56589b3a514e841d /nvim/scripts/sonarqube.sh | |
| parent | 9f6461c5b1cb6754b130b30dfe9ba50fd1fcf9cb (diff) | |
| download | dotfiles-e99756d1d5acb6805003b403985ee0a2a253bf26.tar.gz dotfiles-e99756d1d5acb6805003b403985ee0a2a253bf26.tar.bz2 dotfiles-e99756d1d5acb6805003b403985ee0a2a253bf26.zip | |
Neovim: Sonarqube Unterstützung hinzugefügt
Diffstat (limited to 'nvim/scripts/sonarqube.sh')
| -rwxr-xr-x | nvim/scripts/sonarqube.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/nvim/scripts/sonarqube.sh b/nvim/scripts/sonarqube.sh new file mode 100755 index 0000000..ef1be89 --- /dev/null +++ b/nvim/scripts/sonarqube.sh | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | set -eu | ||
| 4 | |||
| 5 | SONAR_TOKEN=$(awk -F= '/^sonar.token=/ {print $2}' /opt/homebrew/etc/sonar-scanner.properties) | ||
| 6 | SONAR_HOST_URL=$(awk -F= '/^sonar.host.url=/ {print $2}' /opt/homebrew/etc/sonar-scanner.properties) | ||
| 7 | PROJECT_KEY=$(awk -F= '/^sonar.projectKey=/ {print $2}' ./sonar-project.properties) | ||
| 8 | |||
| 9 | curl -s \ | ||
| 10 | -u "$SONAR_TOKEN:" \ | ||
| 11 | "$SONAR_HOST_URL/api/issues/search?componentKeys=$PROJECT_KEY&statuses=OPEN" | | ||
| 12 | jq -r '.issues[] | "\(.component | sub("^[^:]+:"; "")):\(.line // 1): [\(.severity)] \(.message | gsub("\n"; " ")) (\(.author))"' | ||
| 13 | |||
