Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lint tests #2926

Merged
merged 32 commits into from
Jan 16, 2023
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
c403bb2
lint tests
faddat Dec 12, 2022
07c1d2b
don't use prealloc for golangci
faddat Dec 12, 2022
7b0c5b3
fix unnecessary conversions
faddat Dec 12, 2022
7e477b2
var-declaration lints
faddat Dec 12, 2022
3c5432d
fix ineffectual assignments
faddat Dec 12, 2022
7666a6b
fix composite literal lints
faddat Dec 12, 2022
54598dc
address copylocks lints from govet
faddat Dec 12, 2022
79bf5fa
error checks in tests
faddat Dec 12, 2022
d6cd199
handshake_test.go error checks
faddat Dec 12, 2022
e2b5a27
packet_test.go error checks
faddat Dec 12, 2022
4cf6f9d
error checks
faddat Dec 12, 2022
0a247d8
msg_server_test.go
faddat Dec 12, 2022
d0ff51e
errcheck in upgrade_test.go
faddat Dec 12, 2022
8567226
goconsts & linting complete
faddat Dec 12, 2022
42011ef
Merge branch 'main' into golangci-lint-for-tests
faddat Dec 12, 2022
a1c1923
Update CHANGELOG.md
faddat Dec 12, 2022
1bfb6cd
Merge remote-tracking branch 'upstream/main' into golangci-lint-for-t…
faddat Dec 12, 2022
dd0fb8f
Merge branch 'golangci-lint-for-tests' of https://github.com/faddat/i…
faddat Dec 12, 2022
bc6a14d
golangci-lint run ./... --fix
faddat Dec 12, 2022
bb230dd
Merge branch 'main' into golangci-lint-for-tests
faddat Dec 18, 2022
43e58b6
last lint
faddat Dec 18, 2022
0cfe15f
fix lints
faddat Dec 18, 2022
56094f5
tidy
faddat Dec 19, 2022
d2aef2d
Merge branch 'main' into golangci-lint-for-tests
crodriguezvega Dec 19, 2022
b7e987d
Merge branch 'main' into golangci-lint-for-tests
faddat Dec 21, 2022
9734eff
Merge branch 'main' into golangci-lint-for-tests
faddat Dec 24, 2022
425edf3
ignore legacy ica api
faddat Dec 24, 2022
455b036
ignore icacontrollersendtx
faddat Dec 24, 2022
3f4e78d
Merge branch 'main' into golangci-lint-for-tests
crodriguezvega Jan 13, 2023
1b2c4ef
Merge branch 'main' into golangci-lint-for-tests
crodriguezvega Jan 13, 2023
824a7a2
golangci lint fixes
crodriguezvega Jan 16, 2023
c2eac31
fix test
crodriguezvega Jan 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
lint tests
faddat committed Dec 12, 2022

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit c403bb272311558753ac578af26e37b923358d72
4 changes: 1 addition & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
run:
tests: false
tests: true
# # timeout for analysis, e.g. 30s, 5m, default is 1m
timeout: 5m

linters:
disable-all: true
enable:
- deadcode
- depguard
- dogsled
- exportloopref
- errcheck
- goconst
- gocritic
- gofumpt
- goimports
- gosec
- gosimple
- govet
7 changes: 0 additions & 7 deletions modules/apps/27-interchain-accounts/types/codec_test.go
Original file line number Diff line number Diff line change
@@ -11,13 +11,6 @@ import (
"github.com/cosmos/ibc-go/v6/testing/simapp"
)

// caseRawBytes defines a helper struct, used for testing codec operations
type caseRawBytes struct {
name string
bz []byte
expPass bool
}

// mockSdkMsg defines a mock struct, used for testing codec error scenarios
type mockSdkMsg struct{}

3 changes: 2 additions & 1 deletion modules/core/04-channel/types/msgs_test.go
Original file line number Diff line number Diff line change
@@ -80,7 +80,8 @@ func (suite *TypesTestSuite) SetupTest() {
storeKey := storetypes.NewKVStoreKey("iavlStoreKey")

store.MountStoreWithDB(storeKey, storetypes.StoreTypeIAVL, nil)
store.LoadVersion(0)
err := store.LoadVersion(0)
suite.Require().NoError(err)
iavlStore := store.GetCommitStore(storeKey).(*iavl.Store)

iavlStore.Set([]byte("KEY"), []byte("VALUE"))
8 changes: 4 additions & 4 deletions modules/core/23-commitment/types/merkle_test.go
Original file line number Diff line number Diff line change
@@ -64,10 +64,10 @@ func (suite *MerkleTestSuite) TestVerifyMembership() {
err := proof.VerifyMembership(types.GetSDKSpecs(), &root, path, tc.value)

if tc.shouldPass {
// nolint: scopelint
//nolint: scopelint
suite.Require().NoError(err, "test case %d should have passed", i)
} else {
// nolint: scopelint
//nolint: scopelint
suite.Require().Error(err, "test case %d should have failed", i)
}
})
@@ -127,10 +127,10 @@ func (suite *MerkleTestSuite) TestVerifyNonMembership() {
err := proof.VerifyNonMembership(types.GetSDKSpecs(), &root, path)

if tc.shouldPass {
// nolint: scopelint
//nolint: scopelint
suite.Require().NoError(err, "test case %d should have passed", i)
} else {
// nolint: scopelint
//nolint: scopelint
suite.Require().Error(err, "test case %d should have failed", i)
}
})