From 8ba6678dfa2a07aeca5571021269b3280966871c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=81ukasz=20=C5=81opatowski?= <llopat@man.poznan.pl>
Date: Tue, 18 Mar 2025 15:52:19 +0100
Subject: [PATCH] Improved sonar properties file

---
 Dockerfile               |  5 +----
 sonar-project.properties | 18 ++++--------------
 2 files changed, 5 insertions(+), 18 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index cf79586..6aab5b8 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM golang:1.24 as builder
+FROM golang:1.24 AS builder
 WORKDIR /
 RUN apt-get update && apt-get install unzip
 RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v29.1/protoc-29.1-linux-x86_64.zip
@@ -29,9 +29,6 @@ RUN CGO_ENABLED=0 GOOS=linux go test ./...
 WORKDIR /build/pkg/cmd/server
 RUN CGO_ENABLED=0 GOOS=linux go build
 
-RUN cat /build/go.mod
-RUN cat /build/go.sum
-
 FROM alpine:latest
 MAINTAINER nmaas@lists.geant.org
 COPY --from=builder /build/pkg/cmd/server/server /go/bin/nmaas-janitor
diff --git a/sonar-project.properties b/sonar-project.properties
index 269a37e..15f8f98 100644
--- a/sonar-project.properties
+++ b/sonar-project.properties
@@ -1,15 +1,5 @@
-# must be unique in a given SonarQube instance
-#sonar.projectKey=my:project
+sonar.sources=.
+sonar.exclusions=**/*_test.go
 
-# --- optional properties ---
-
-# defaults to project key
-#sonar.projectName=My project
-# defaults to 'not provided'
-#sonar.projectVersion=1.0
-
-# Path is relative to the sonar-project.properties file. Defaults to .
-#sonar.sources=.
-
-# Encoding of the source code. Default is default system encoding
-#sonar.sourceEncoding=UTF-8
\ No newline at end of file
+sonar.tests=.
+sonar.test.inclusions=**/*_test.go
\ No newline at end of file
-- 
GitLab