aboutsummaryrefslogtreecommitdiff
path: root/nvim
diff options
context:
space:
mode:
authorThomas Schmucker <ts@its1.de>2026-03-25 16:53:57 +0100
committerThomas Schmucker <ts@its1.de>2026-03-25 16:53:57 +0100
commit7f125434eaa17a7e15beca2654f8a89507cf3a22 (patch)
treece63e51ce5a7d7ddeae21429244b35b47e526d08 /nvim
parenta02ec9dde93be19ed0a3a70666050710c6ab5bc7 (diff)
downloaddotfiles-7f125434eaa17a7e15beca2654f8a89507cf3a22.tar.gz
dotfiles-7f125434eaa17a7e15beca2654f8a89507cf3a22.tar.bz2
dotfiles-7f125434eaa17a7e15beca2654f8a89507cf3a22.zip
Neovim: Bessere Unterstützung für komplexere sonarqube Projekte
Diffstat (limited to 'nvim')
-rwxr-xr-xnvim/scripts/sonarqube.sh16
1 files changed, 12 insertions, 4 deletions
diff --git a/nvim/scripts/sonarqube.sh b/nvim/scripts/sonarqube.sh
index ef1be89..15c042e 100755
--- a/nvim/scripts/sonarqube.sh
+++ b/nvim/scripts/sonarqube.sh
@@ -2,12 +2,20 @@
2 2
3set -eu 3set -eu
4 4
5SONAR_TOKEN=$(awk -F= '/^sonar.token=/ {print $2}' /opt/homebrew/etc/sonar-scanner.properties) 5SONAR_CONFIGURATION_FILE="/opt/homebrew/etc/sonar-scanner.properties"
6SONAR_HOST_URL=$(awk -F= '/^sonar.host.url=/ {print $2}' /opt/homebrew/etc/sonar-scanner.properties) 6PROJECT_FILE=$(find . -maxdepth 1 -name "sonar-project*.properties" | head -n 1)
7PROJECT_KEY=$(awk -F= '/^sonar.projectKey=/ {print $2}' ./sonar-project.properties) 7
8if [ -z "$PROJECT_FILE" ]; then
9 echo "Keine sonar-project*.properties Datei gefunden!" >&2
10 exit 1
11fi
12
13SONAR_TOKEN=$(awk -F= '/^sonar.token=/ {print $2}' "$SONAR_CONFIGURATION_FILE")
14SONAR_HOST_URL=$(awk -F= '/^sonar.host.url=/ {print $2}' "$SONAR_CONFIGURATION_FILE")
15PROJECT_KEY=$(awk -F= '/^sonar.projectKey=/ {print $2}' "$PROJECT_FILE")
8 16
9curl -s \ 17curl -s \
10 -u "$SONAR_TOKEN:" \ 18 -u "$SONAR_TOKEN:" \
11 "$SONAR_HOST_URL/api/issues/search?componentKeys=$PROJECT_KEY&statuses=OPEN" | 19 "$SONAR_HOST_URL/api/issues/search?componentKeys=$PROJECT_KEY&statuses=OPEN&ps=500" |
12 jq -r '.issues[] | "\(.component | sub("^[^:]+:"; "")):\(.line // 1): [\(.severity)] \(.message | gsub("\n"; " ")) (\(.author))"' 20 jq -r '.issues[] | "\(.component | sub("^[^:]+:"; "")):\(.line // 1): [\(.severity)] \(.message | gsub("\n"; " ")) (\(.author))"'
13 21