ci: make sonarcloud more quiet (#14585)

Co-authored-by: Marko <marbar3778@yahoo.com>
This commit is contained in:
Julien Robert 2023-01-12 11:24:56 +01:00 committed by GitHub
parent c7e10f21dd
commit 538f7ce723
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 31 additions and 41 deletions

View File

@ -9,7 +9,7 @@ on:
- ready_for_review
branches:
- "main"
- "releases/**"
- "release/**"
jobs:
request:

View File

@ -271,7 +271,7 @@ jobs:
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_CLIENT_V2 }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: client/v2/
@ -301,7 +301,7 @@ jobs:
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_CORE }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: core/
@ -331,7 +331,7 @@ jobs:
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_DEPINJECT }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
test-errors:
runs-on: ubuntu-latest
@ -359,7 +359,7 @@ jobs:
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_ERRORS }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: errors/
@ -389,7 +389,7 @@ jobs:
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_MATH }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: math/
@ -424,7 +424,7 @@ jobs:
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_SIMAPP }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: simapp/
@ -454,7 +454,7 @@ jobs:
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_TX }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: tx/
@ -488,7 +488,7 @@ jobs:
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_ROSETTA }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: tools/rosetta/
@ -518,7 +518,7 @@ jobs:
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_COLLECTIONS }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: collections/
@ -548,7 +548,7 @@ jobs:
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_COSMOVISOR }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: tools/cosmovisor/
@ -578,7 +578,7 @@ jobs:
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_X_NFT }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: x/nft/
@ -608,6 +608,6 @@ jobs:
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_CONFIX }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: tools/confix/

View File

@ -186,12 +186,13 @@ For consistency between our CI and the local tests, `GOWORK=off` is set in the `
When extracting a package to its own go modules, some extra steps are required, for keeping our CI checks and Dev UX:
* Add a CHANGELOG.md / README.md under the new package folder
* Add the package in [`go.work.example`](./go.work.example)
* Add weekly dependabot checks (see [dependabot.yml](./.github/dependabot.yml))
* Pre-configure SonarCloud
* Add tests to github workflow [test.yml](.github/workflows/test.yml) (under submodules)
* Configure SonarCloud
* Add `sonar-projects.properties` (see math [sonar-projects.properties](./math/sonar-projects.properties) for example)
* Add a GitHub Workflow entry for running the scans (see [test.yml](.github/workflows/test.yml))
* Add an entry for skipping the tests (see [test-skip.yml](.github/workflows/test-skip.yml))
* Ask the team to add the project to SonarCloud
## Protobuf

View File

@ -11,5 +11,4 @@ sonar.test.inclusions=**/*_test.go
sonar.go.coverage.reportPaths=coverage.out
sonar.sourceEncoding=UTF-8
sonar.scm.provider=git
sonar.pullrequest.github.summary_comment=true
sonar.scm.provider=git

View File

@ -11,5 +11,4 @@ sonar.test.inclusions=**/*_test.go
sonar.go.coverage.reportPaths=coverage.out
sonar.sourceEncoding=UTF-8
sonar.scm.provider=git
sonar.pullrequest.github.summary_comment=true
sonar.scm.provider=git

View File

@ -11,5 +11,4 @@ sonar.test.inclusions=**/*_test.go
sonar.go.coverage.reportPaths=coverage.out
sonar.sourceEncoding=UTF-8
sonar.scm.provider=git
sonar.pullrequest.github.summary_comment=true
sonar.scm.provider=git

View File

@ -11,5 +11,4 @@ sonar.test.inclusions=**/*_test.go
sonar.go.coverage.reportPaths=coverage.out
sonar.sourceEncoding=UTF-8
sonar.scm.provider=git
sonar.pullrequest.github.summary_comment=true
sonar.scm.provider=git

View File

@ -9,6 +9,8 @@ import (
grpcstatus "google.golang.org/grpc/status"
)
// foo
// UndefinedCodespace when we explicitly declare no codespace
const UndefinedCodespace = "undefined"

View File

@ -1,7 +1,7 @@
sonar.projectKey=cosmos-sdk-errors
sonar.organization=cosmos
sonar.projectName=Cosmos SDK Errors
sonar.projectName=Cosmos SDK - Errors
sonar.project.monorepo.enabled=true
sonar.sources=.
@ -11,5 +11,4 @@ sonar.test.inclusions=**/*_test.go
sonar.go.coverage.reportPaths=coverage.out
sonar.sourceEncoding=UTF-8
sonar.scm.provider=git
sonar.pullrequest.github.summary_comment=true
sonar.scm.provider=git

View File

@ -11,5 +11,4 @@ sonar.test.inclusions=**/*_test.go
sonar.go.coverage.reportPaths=coverage.out
sonar.sourceEncoding=UTF-8
sonar.scm.provider=git
sonar.pullrequest.github.summary_comment=true
sonar.scm.provider=git

View File

@ -11,5 +11,4 @@ sonar.test.inclusions=**/*_test.go
sonar.go.coverage.reportPaths=coverage.out
sonar.sourceEncoding=UTF-8
sonar.scm.provider=git
sonar.pullrequest.github.summary_comment=true
sonar.scm.provider=git

View File

@ -13,7 +13,6 @@ sonar.go.coverage.reportPaths=coverage.out,*profile.out
sonar.python.version=3
sonar.sourceEncoding=UTF-8
sonar.scm.provider=git
sonar.pullrequest.github.summary_comment=true
# Exclude C/C++/Objective-C files from analysis
sonar.c.file.suffixes=-

View File

@ -11,5 +11,4 @@ sonar.test.inclusions=**/*_test.go
sonar.go.coverage.reportPaths=coverage.out
sonar.sourceEncoding=UTF-8
sonar.scm.provider=git
sonar.pullrequest.github.summary_comment=true
sonar.scm.provider=git

View File

@ -11,5 +11,4 @@ sonar.test.inclusions=**/*_test.go
sonar.go.coverage.reportPaths=coverage.out
sonar.sourceEncoding=UTF-8
sonar.scm.provider=git
sonar.pullrequest.github.summary_comment=true
sonar.scm.provider=git

View File

@ -11,5 +11,4 @@ sonar.test.inclusions=**/*_test.go
sonar.go.coverage.reportPaths=coverage.out
sonar.sourceEncoding=UTF-8
sonar.scm.provider=git
sonar.pullrequest.github.summary_comment=true
sonar.scm.provider=git

View File

@ -11,5 +11,4 @@ sonar.test.inclusions=**/*_test.go
sonar.go.coverage.reportPaths=coverage.out
sonar.sourceEncoding=UTF-8
sonar.scm.provider=git
sonar.pullrequest.github.summary_comment=true
sonar.scm.provider=git

View File

@ -11,5 +11,4 @@ sonar.test.inclusions=**/*_test.go
sonar.go.coverage.reportPaths=coverage.out
sonar.sourceEncoding=UTF-8
sonar.scm.provider=git
sonar.pullrequest.github.summary_comment=true
sonar.scm.provider=git