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

chore(*): fix lint config #126

Merged
merged 7 commits into from
Nov 13, 2024
Merged

chore(*): fix lint config #126

merged 7 commits into from
Nov 13, 2024

Conversation

Lazar955
Copy link
Member

Fixes linting configuration (currently 126 issues outstanding)

@Lazar955 Lazar955 requested a review from gitferry November 12, 2024 12:09
Copy link
Member

@gitferry gitferry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing all of them!

Comment on lines +45 to 46
//nolint:nilerr
return nil // if no conifg is found just stop.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel that this error can be returned

Comment on lines +29 to 30
//nolint:nilerr
return nil // config does not exist, so does not update it
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also feel the error can be returned

@@ -8,7 +8,6 @@ import (
"sync/atomic"

"cosmossdk.io/math"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about renaming it to sdkmath?


for _, tc := range tcs {
tc := tc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how could this work?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be a false positive by the linter, but remember in previous versions of golang when running a go routine in a loop you couldn't just pass the loop variable into the go routine but you had to either to this, or pass it as an argument to the go routine

@@ -16,7 +16,6 @@ import (
sdkmath "cosmossdk.io/math"
"github.com/babylonlabs-io/babylon/testutil/datagen"
bbn "github.com/babylonlabs-io/babylon/types"
bbntypes "github.com/babylonlabs-io/babylon/types"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curious why bbntypes not good?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate imports:

	bbn "github.com/babylonlabs-io/babylon/types"
	bbntypes "github.com/babylonlabs-io/babylon/types"

@Lazar955 Lazar955 merged commit cb1c05e into main Nov 13, 2024
12 checks passed
@Lazar955 Lazar955 deleted the lazar/fix-lint branch November 13, 2024 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants