From bea0a087f18c14a0761dbb67104457d38530b6b8 Mon Sep 17 00:00:00 2001 From: jvmistica Date: Sat, 22 Jul 2023 23:08:50 +0200 Subject: [PATCH] feat: add sonar properties --- .github/workflows/go.yml | 6 ++++++ Makefile | 3 +-- sonar-project.properties | 4 ++++ 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 sonar-project.properties diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 1c310f0..15789ea 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -27,3 +27,9 @@ jobs: - name: vulncheck run: make vulncheck + + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITTOKEN }} + SONAR_TOKEN: ${{ secrets.SONARTOKEN }} diff --git a/Makefile b/Makefile index 78f2525..39751b9 100644 --- a/Makefile +++ b/Makefile @@ -2,10 +2,9 @@ format: @go fmt ./... test: - @go test -cover -v ./... + @go test ./... -coverprofile cover.out cover: - @go test ./... -coverprofile cover.out @go tool cover -html cover.out -o cover.html run: diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..557a0b4 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,4 @@ +sonar.projectKey=jvmistica_telegram-assistant +sonar.organization=jvmistica +sonar.go.coverage.reportPaths=cover.out +sonar.test.inclusions=**/*_test.go