diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9760d409b158e4428978c682ceaebfca0104337d..7ef08bea956cfef8f3aebfa59a6317c1ce0d4115 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -29,18 +29,20 @@ build_package:
     expire_in: "1w"
 
 
-variables:
-  stage: quality
-  SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar"  # Defines the location of the analysis task cache
-  GIT_DEPTH: "0"  # Tells git to fetch all the branches of the project, required by the analysis task
+
 sonarcloud-check:
+  stage: quality
   image:
     name: sonarsource/sonar-scanner-cli:latest
-    entrypoint: [""]
+    entrypoint: [ "" ]
   cache:
     key: "${CI_JOB_NAME}"
     paths:
       - .sonar/cache
+  variables:
+    SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar"  # Defines the location of the analysis task cache
+    GIT_DEPTH: "0"  # Tells git to fetch all the branches of the project, required by the analysis task
+  before_script: [ ]
   script:
     - sonar-scanner
   only: