From 660e3de752fa2561f3b76526b7d7697205c03d04 Mon Sep 17 00:00:00 2001
From: Rikza Kurnia Almujtaba <rikza.kurnia@ui.ac.id>
Date: Sat, 24 Feb 2024 20:04:14 +0700
Subject: [PATCH] add sonar properties

---
 .gitlab-ci.yml           |  6 +-----
 sonar-project.properties | 16 ++++++++++++++++
 2 files changed, 17 insertions(+), 5 deletions(-)
 create mode 100644 sonar-project.properties

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index faab31f6..33d1f75f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -27,11 +27,7 @@ sonarqube-check:
     paths:
       - .sonar/cache
   script:
-    - sonar-scanner \
-      -Dsonar.projectKey=eldira.lahanny_a4-logistik_AY3a82YUk9qxTTGJIC4V \
-      -Dsonar.host.url=https://sonarqube.cs.ui.ac.id \
-      -Dsonar.login=46ad35b1d3f133c21f7f85027d9475ae197d20d7 \
-      -Dsonar.qualitygate.wait=true
+    - sonar-scanner -Dsonar.qualitygate.wait=true
   
   allow_failure: true
   rules:
diff --git a/sonar-project.properties b/sonar-project.properties
new file mode 100644
index 00000000..bb5ff132
--- /dev/null
+++ b/sonar-project.properties
@@ -0,0 +1,16 @@
+# must be unique in a given SonarQube instance
+sonar.projectKey=eldira.lahanny_a4-logistik_AY3a82YUk9qxTTGJIC4V
+
+# --- optional properties ---
+# defaults to project key
+#sonar.projectName=My project
+# defaults to 'not provided'
+#sonar.projectVersion=1.0
+sonar.host.url=https://sonarqube.cs.ui.ac.id
+sonar.login=46ad35b1d3f133c21f7f85027d9475ae197d20d7
+ 
+# 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
-- 
GitLab