From 0759d9e66f5b86809160bb11bc384b73798de58b Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Fri, 31 May 2024 17:17:35 +0200 Subject: [PATCH 1/4] sonarcleanup --- .golangci.yml | 26 +++++++++++--------------- sonar-project.properties | 2 +- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 20fadf26179f..fc4dd038ba30 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,19 +1,8 @@ run: tests: true timeout: 15m - sort-results: true allow-parallel-runners: true - exclude-dir: testutil/testdata - skip-files: - - server/grpc/gogoreflection/fix_registration.go - - "fix_registration.go" - - ".*\\.pb\\.go$" - - ".*\\.pb\\.gw\\.go$" - - ".*\\.pulsar\\.go$" - - crypto/keys/secp256k1/internal/* - - types/coin_regex.go - -build-tags: + build-tags: - e2e - ledger - test_ledger_mock @@ -46,6 +35,16 @@ linters: - unused issues: + exclude-dirs: + - testutil/testdata + exclude-files: + - server/grpc/gogoreflection/fix_registration.go + - "fix_registration.go" + - ".*\\.pb\\.go$" + - ".*\\.pb\\.gw\\.go$" + - ".*\\.pulsar\\.go$" + - crypto/keys/secp256k1/internal/* + - types/coin_regex.go exclude-rules: - text: "Use of weak random number generator" linters: @@ -141,11 +140,8 @@ linters-settings: extra-rules: true dogsled: max-blank-identifiers: 6 - maligned: - suggest-new: true nolintlint: allow-unused: false - allow-leading-space: true require-explanation: true require-specific: false gosimple: diff --git a/sonar-project.properties b/sonar-project.properties index 816abe8a8c79..2351690589bd 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -6,7 +6,7 @@ sonar.project.monorepo.enabled=true sonar.sources=. sonar.exclusions=**/*_test.go,**/*.pb.go,**/*.pulsar.go,**/*.pb.gw.go -sonar.coverage.exclusions=**/*_test.go,**/testutil/**,**/*.pb.go,**/*.pb.gw.go,**/*.pulsar.go,test_helpers.go,docs/** +sonar.coverage.exclusions=**/*_test.go,**/testutil/**,**/*.pb.go,**/*.pb.gw.go,**/*.pulsar.go,test_helpers.go,docs/**,server/v2/**,store/v2/**,x/tx/**,tools/**,cmd/**,app/**,simapp/**,testutil/**,test_helpers.go,tests/**,test_helpers.go,docs/**,server/v2/**,store/**,x/tx/**,tools/**,simapp/**,tests/**,orm/**,client/v2/**,runtime/v2/**,core/**,store/**,x/evidence,x/feegrant,x/authz,x/auth,x/bank,api,x/gov sonar.tests=. sonar.test.inclusions=**/*_test.go,tests/**,**/testutil/** sonar.go.coverage.reportPaths=coverage.out,*profile.out From ed26a6a6a1b9d3b960db76e6ba9d8cc4d7ed1a59 Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Fri, 31 May 2024 17:26:34 +0200 Subject: [PATCH 2/4] some more --- sonar-project.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonar-project.properties b/sonar-project.properties index 2351690589bd..28e41f87be52 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -6,7 +6,7 @@ sonar.project.monorepo.enabled=true sonar.sources=. sonar.exclusions=**/*_test.go,**/*.pb.go,**/*.pulsar.go,**/*.pb.gw.go -sonar.coverage.exclusions=**/*_test.go,**/testutil/**,**/*.pb.go,**/*.pb.gw.go,**/*.pulsar.go,test_helpers.go,docs/**,server/v2/**,store/v2/**,x/tx/**,tools/**,cmd/**,app/**,simapp/**,testutil/**,test_helpers.go,tests/**,test_helpers.go,docs/**,server/v2/**,store/**,x/tx/**,tools/**,simapp/**,tests/**,orm/**,client/v2/**,runtime/v2/**,core/**,store/**,x/evidence,x/feegrant,x/authz,x/auth,x/bank,api,x/gov +sonar.coverage.exclusions=**/*_test.go,**/testutil/**,**/*.pb.go,**/*.pb.gw.go,**/*.pulsar.go,test_helpers.go,docs/**,server/v2/**,store/v2/**,x/tx/**,tools/**,cmd/**,app/**,simapp/**,testutil/**,test_helpers.go,tests/**,test_helpers.go,docs/**,server/v2/**,store/**,x/tx/**,tools/**,simapp/**,tests/**,orm/**,client/v2/**,runtime/v2/**,core/**,store/**,x/evidence,x/feegrant,x/authz,x/auth,x/bank,api,x/gov,x/staking,x/group,x/nft sonar.tests=. sonar.test.inclusions=**/*_test.go,tests/**,**/testutil/** sonar.go.coverage.reportPaths=coverage.out,*profile.out From f2d98a247b952e322fa025352ce2fd557805aee2 Mon Sep 17 00:00:00 2001 From: Marko Date: Fri, 31 May 2024 22:50:13 +0200 Subject: [PATCH 3/4] Update sonar-project.properties Co-authored-by: Julien Robert --- sonar-project.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonar-project.properties b/sonar-project.properties index 28e41f87be52..ccf2c36b25dd 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -6,7 +6,7 @@ sonar.project.monorepo.enabled=true sonar.sources=. sonar.exclusions=**/*_test.go,**/*.pb.go,**/*.pulsar.go,**/*.pb.gw.go -sonar.coverage.exclusions=**/*_test.go,**/testutil/**,**/*.pb.go,**/*.pb.gw.go,**/*.pulsar.go,test_helpers.go,docs/**,server/v2/**,store/v2/**,x/tx/**,tools/**,cmd/**,app/**,simapp/**,testutil/**,test_helpers.go,tests/**,test_helpers.go,docs/**,server/v2/**,store/**,x/tx/**,tools/**,simapp/**,tests/**,orm/**,client/v2/**,runtime/v2/**,core/**,store/**,x/evidence,x/feegrant,x/authz,x/auth,x/bank,api,x/gov,x/staking,x/group,x/nft +sonar.coverage.exclusions=**/*_test.go,**/testutil/**,**/*.pb.go,**/*.pb.gw.go,**/*.pulsar.go,docs/**,server/v2/**,store/v2/**,x/tx/**,tools/**,,simapp/**,testutil/**,test_helpers.go,tests/**,test_helpers.go,docs/**,store/**,tests/**,orm/**,client/v2/**,runtime/v2/**,core/**,store/**,x/evidence,x/feegrant,x/authz,x/auth,x/bank,api,x/gov,x/staking,x/group,x/nft sonar.tests=. sonar.test.inclusions=**/*_test.go,tests/**,**/testutil/** sonar.go.coverage.reportPaths=coverage.out,*profile.out From 2cf8c4ecc7f5dd8735a1580ec9a5325da84f81ff Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Fri, 31 May 2024 22:51:52 +0200 Subject: [PATCH 4/4] fix it --- sonar-project.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sonar-project.properties b/sonar-project.properties index ccf2c36b25dd..95bd2b396fa3 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -5,8 +5,8 @@ sonar.projectName=Cosmos SDK sonar.project.monorepo.enabled=true sonar.sources=. -sonar.exclusions=**/*_test.go,**/*.pb.go,**/*.pulsar.go,**/*.pb.gw.go -sonar.coverage.exclusions=**/*_test.go,**/testutil/**,**/*.pb.go,**/*.pb.gw.go,**/*.pulsar.go,docs/**,server/v2/**,store/v2/**,x/tx/**,tools/**,,simapp/**,testutil/**,test_helpers.go,tests/**,test_helpers.go,docs/**,store/**,tests/**,orm/**,client/v2/**,runtime/v2/**,core/**,store/**,x/evidence,x/feegrant,x/authz,x/auth,x/bank,api,x/gov,x/staking,x/group,x/nft +sonar.exclusions=**/*_test.go,**/*.pb.go,**/*.pulsar.go,**/*.pb.gw.go,*.java +sonar.coverage.exclusions=**/*_test.go,**/testutil/**,**/*.pb.go,**/*.pb.gw.go,**/*.pulsar.go,docs/**,server/v2/**,store/v2/**,x/tx/**,tools/**,simapp/**,testutil/**,test_helpers.go,tests/**,test_helpers.go,docs/**,store/**,tests/**,orm/**,client/v2/**,runtime/v2/**,core/**,store/**,x/evidence,x/feegrant,x/authz,x/auth,x/bank,api,x/gov,x/staking,x/group,x/nft sonar.tests=. sonar.test.inclusions=**/*_test.go,tests/**,**/testutil/** sonar.go.coverage.reportPaths=coverage.out,*profile.out