From 18046bbe18c600983ae7a60d9f25e995cde3a760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20Tr=C3=B6ger?= Date: Tue, 7 Oct 2025 14:54:24 +0200 Subject: [PATCH] added sonarqube for static code analysis --- .gitea/workflows/test.yaml | 8 ++++++++ .../sonar-project.properties => sonar-project.properties | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) rename Backend/sonar-project.properties => sonar-project.properties (54%) diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index 08cf542..51251a6 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -46,3 +46,11 @@ jobs: arbeitszeitmessung- - name: Run Go Tests run: cd Backend && go test ./... + - uses: SonarSource/sonarqube-scan-action@v6 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + - uses: SonarSource/sonarqube-quality-gate-action@v1 + timeout-minutes: 5 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/Backend/sonar-project.properties b/sonar-project.properties similarity index 54% rename from Backend/sonar-project.properties rename to sonar-project.properties index d859e77..dbf4089 100644 --- a/Backend/sonar-project.properties +++ b/sonar-project.properties @@ -4,5 +4,5 @@ sonar.exclusions=**/*_test.go sonar.tests=. sonar.test.inclusions=**/*_test.go -sonar.go.tests.reportPaths=.test/report.json -sonar.go.coverage.reportPaths=.test/coverage.out +sonar.go.tests.reportPaths=Backned/.test/report.json +sonar.go.coverage.reportPaths=Backned/.test/coverage.out