Add SonarQube analysis
Signed-off-by: Steven Kriegler <sk.bunsenbrenner@gmail.com>
This commit is contained in:
parent
8a7e9f83fa
commit
24e4249411
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,6 +1,7 @@
|
||||||
/.git/
|
/.git/
|
||||||
/.idea/
|
/.idea/
|
||||||
/.vscode/
|
/.vscode/
|
||||||
|
/.scannerwork/
|
||||||
/config/
|
/config/
|
||||||
/vendor/
|
/vendor/
|
||||||
/gitea-sonarqube-bot
|
/gitea-sonarqube-bot
|
||||||
|
@ -8,3 +9,4 @@
|
||||||
/*.log
|
/*.log
|
||||||
/cover.out
|
/cover.out
|
||||||
/cover.html
|
/cover.html
|
||||||
|
/test-report.out
|
||||||
|
|
5
Makefile
5
Makefile
|
@ -25,7 +25,7 @@ run:
|
||||||
clean:
|
clean:
|
||||||
go clean
|
go clean
|
||||||
rm -f ${BINARY_NAME}
|
rm -f ${BINARY_NAME}
|
||||||
rm -f cover.out cover.html
|
rm -f cover.out cover.html test-report.out
|
||||||
|
|
||||||
test:
|
test:
|
||||||
ifdef p
|
ifdef p
|
||||||
|
@ -37,6 +37,9 @@ endif
|
||||||
test\#%:
|
test\#%:
|
||||||
go test -mod=vendor -run $(subst .,/,$*) ./...
|
go test -mod=vendor -run $(subst .,/,$*) ./...
|
||||||
|
|
||||||
|
test-ci:
|
||||||
|
go test -mod=vendor -coverprofile=cover.out -json ./... > test-report.out
|
||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
go test -coverprofile=cover.out ./...
|
go test -coverprofile=cover.out ./...
|
||||||
go tool cover -html=cover.out -o cover.html
|
go tool cover -html=cover.out -o cover.html
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
# Gitea SonarQube Bot
|
# Gitea SonarQube Bot
|
||||||
|
|
||||||
|
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=gitea-sonarqube-bot&metric=alert_status)](https://sonarcloud.io/dashboard?id=gitea-sonarqube-bot)
|
||||||
|
|
||||||
_Gitea SonarQube Bot_ is a bot that receives messages from both SonarQube and Gitea to help developers
|
_Gitea SonarQube Bot_ is a bot that receives messages from both SonarQube and Gitea to help developers
|
||||||
being productive. The idea behind this project is the missing ALM integration of Gitea in SonarQube. Unfortunately,
|
being productive. The idea behind this project is the missing ALM integration of Gitea in SonarQube. Unfortunately,
|
||||||
this [won't be added in near future](https://github.com/SonarSource/sonarqube/pull/3248#issuecomment-701334327).
|
this [won't be added in near future](https://github.com/SonarSource/sonarqube/pull/3248#issuecomment-701334327).
|
||||||
|
|
15
sonar-project.properties
Normal file
15
sonar-project.properties
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
sonar.sourceEncoding=UTF-8
|
||||||
|
|
||||||
|
sonar.host.url=https://sonarcloud.io
|
||||||
|
sonar.organization=justusbunsi
|
||||||
|
sonar.projectKey=gitea-sonarqube-bot
|
||||||
|
sonar.projectName=Gitea SonarQube Bot
|
||||||
|
|
||||||
|
sonar.sources=.
|
||||||
|
sonar.exclusions=**/*_test.go,contrib/**,docker/**,docs/**,helm/**
|
||||||
|
|
||||||
|
sonar.tests=.
|
||||||
|
sonar.test.inclusions=**/*_test.go
|
||||||
|
|
||||||
|
sonar.go.tests.reportPaths=test-report.out
|
||||||
|
sonar.go.coverage.reportPaths=cover.out
|
Loading…
Reference in a new issue