I expected to sonarqube scanner our code on gitlab, and then I will see my code has comment if changed code has issue.
This plugin has more detail description, but it only support SonarQube < 7.7, because preview mode is removed.
I would be thankful if you would provide us with detail videos or documents.
This feature is important to our team.
gitlab screen
I use the following software.
Sonar software:
SonarQube 8.1 developer editon (build on docker)
https://hub.docker.com/_/sonarqube/
SonarScanner ( build on CI/CD):
Gitlab
.gitlab-ci.yml
image:
name: sonarsource/sonar-scanner-cli:latest
entrypoint: [""]
variables:
SONAR_TOKEN: XXXXX
SONAR_HOST_URL: http://XX.XX.XX.XX:9000
GIT_DEPTH: 0
SONAR_ENCODING: UTF-8
SONAR_GITLAB_USER_TOKEN: XXXXXXXXX
sonarqube-check:
stage: test
script:
- sonar-scanner -Dsonar.qualitygate.wait=true -Dsonar.gitlab.only_issue_from_commit_line=true -Dsonar.gitlab.only_issue_from_commit_file=true
allow_failure: true
sonar-project.properties
sonar.projectKey=org.example:spring-boot
sonar.java.binaries=.
sonar.sourceEncoding=UTF-8