https://github.com/remast/service_sonar
Example for analyzing Go code with SonarQube (including Github Action).
https://github.com/remast/service_sonar
beginner-friendly cleancode go golang sonarqube
Last synced: 4 months ago
JSON representation
Example for analyzing Go code with SonarQube (including Github Action).
- Host: GitHub
- URL: https://github.com/remast/service_sonar
- Owner: remast
- Created: 2019-02-09T09:21:21.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-03-14T16:27:35.000Z (7 months ago)
- Last Synced: 2025-06-22T11:07:04.235Z (4 months ago)
- Topics: beginner-friendly, cleancode, go, golang, sonarqube
- Language: HTML
- Homepage:
- Size: 26.4 KB
- Stars: 16
- Watchers: 1
- Forks: 16
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://sonarcloud.io/dashboard?id=de.red6%3Aservice_sonar) 
# Example for SonarQube with GoExample on static analysis of Go code using SonarQube for the blog post [Go for SonarQube](https://medium.com/@remast/go-for-sonarqube-ffff5b74f33a).
## Start SonarQube
docker run -d --name sonarqube -p 9000:9000 sonarqube
## Run SonarQube analysis
docker run --rm --network host --mount type=volume,src="$(pwd)",dst=/opt/app,type=bind -w=/opt/app red6/docker-sonar-scanner:latest sonar-scanner -Dsonar.login=**SECRET**
## Github Action
This project also uses Github Actions as documented in [Scan your code with SonarCloud](https://github.com/SonarSource/sonarcloud-github-action).
Code coverage is analyzed during the test and then reported to SonarCloud using [upload-artifact](https://github.com/actions/upload-artifact) and [download-artifact](https://github.com/actions/download-artifact).