diff --git a/.github/workflows/pr-reviews.yml b/.github/workflows/pr-reviews.yml index 76af24df2d..4ed750ee1a 100644 --- a/.github/workflows/pr-reviews.yml +++ b/.github/workflows/pr-reviews.yml @@ -9,7 +9,7 @@ on: - ready_for_review branches: - "main" - - "releases/**" + - "release/**" jobs: request: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8818072f0e..6ff5094098 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0f77a4086f..19ac50f683 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 diff --git a/client/v2/sonar-project.properties b/client/v2/sonar-project.properties index f435ba2424..d08e6a24ac 100644 --- a/client/v2/sonar-project.properties +++ b/client/v2/sonar-project.properties @@ -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 \ No newline at end of file +sonar.scm.provider=git \ No newline at end of file diff --git a/collections/sonar-project.properties b/collections/sonar-project.properties index 9dd364b6f5..b22f312ca9 100644 --- a/collections/sonar-project.properties +++ b/collections/sonar-project.properties @@ -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 \ No newline at end of file +sonar.scm.provider=git \ No newline at end of file diff --git a/core/sonar-project.properties b/core/sonar-project.properties index 43825ddb37..c5d84a78ed 100644 --- a/core/sonar-project.properties +++ b/core/sonar-project.properties @@ -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 \ No newline at end of file +sonar.scm.provider=git \ No newline at end of file diff --git a/depinject/sonar-project.properties b/depinject/sonar-project.properties index c3f568fdbf..04c63cddf7 100644 --- a/depinject/sonar-project.properties +++ b/depinject/sonar-project.properties @@ -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 \ No newline at end of file +sonar.scm.provider=git \ No newline at end of file diff --git a/errors/errors.go b/errors/errors.go index 088476c81d..edcdd0b95e 100644 --- a/errors/errors.go +++ b/errors/errors.go @@ -9,6 +9,8 @@ import ( grpcstatus "google.golang.org/grpc/status" ) +// foo + // UndefinedCodespace when we explicitly declare no codespace const UndefinedCodespace = "undefined" diff --git a/errors/sonar-project.properties b/errors/sonar-project.properties index 2413993d8f..121c12cb75 100644 --- a/errors/sonar-project.properties +++ b/errors/sonar-project.properties @@ -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 \ No newline at end of file +sonar.scm.provider=git \ No newline at end of file diff --git a/math/sonar-project.properties b/math/sonar-project.properties index ed9f047121..d4a36b3a6e 100644 --- a/math/sonar-project.properties +++ b/math/sonar-project.properties @@ -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 \ No newline at end of file +sonar.scm.provider=git \ No newline at end of file diff --git a/simapp/sonar-project.properties b/simapp/sonar-project.properties index 614f5badaf..1da573f424 100644 --- a/simapp/sonar-project.properties +++ b/simapp/sonar-project.properties @@ -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 \ No newline at end of file +sonar.scm.provider=git \ No newline at end of file diff --git a/sonar-project.properties b/sonar-project.properties index b447e8231f..b9090bd34e 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -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=- diff --git a/tools/confix/sonar-project.properties b/tools/confix/sonar-project.properties index 4cc73a6b2f..cb3df0b72d 100644 --- a/tools/confix/sonar-project.properties +++ b/tools/confix/sonar-project.properties @@ -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 \ No newline at end of file +sonar.scm.provider=git \ No newline at end of file diff --git a/tools/cosmovisor/sonar-project.properties b/tools/cosmovisor/sonar-project.properties index 02c95832b8..6b3ea0666a 100644 --- a/tools/cosmovisor/sonar-project.properties +++ b/tools/cosmovisor/sonar-project.properties @@ -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 \ No newline at end of file +sonar.scm.provider=git \ No newline at end of file diff --git a/tools/rosetta/sonar-project.properties b/tools/rosetta/sonar-project.properties index b483a79f09..ec76cff280 100644 --- a/tools/rosetta/sonar-project.properties +++ b/tools/rosetta/sonar-project.properties @@ -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 \ No newline at end of file +sonar.scm.provider=git \ No newline at end of file diff --git a/tx/sonar-project.properties b/tx/sonar-project.properties index 72a0cb4e00..b04a5c4f80 100644 --- a/tx/sonar-project.properties +++ b/tx/sonar-project.properties @@ -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 \ No newline at end of file +sonar.scm.provider=git \ No newline at end of file diff --git a/x/nft/sonar-project.properties b/x/nft/sonar-project.properties index c355fcf297..7c3466058a 100644 --- a/x/nft/sonar-project.properties +++ b/x/nft/sonar-project.properties @@ -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 \ No newline at end of file +sonar.scm.provider=git \ No newline at end of file