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: add/remove linters for consistency #102

Merged
merged 1 commit into from
Nov 20, 2024

Conversation

jkongie
Copy link
Collaborator

@jkongie jkongie commented Nov 20, 2024

Updates the linters to be consistent with DPA standards.

Updates the linters to be consistent with DPA standards.
@jkongie jkongie requested a review from a team as a code owner November 20, 2024 09:05
@@ -3,46 +3,75 @@ run:
tests: false
modules-download-mode: readonly
linters:
disable-all: true
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was not removed in this PR because the only linter this ends up disabling is the unused linter.

There are a number of functions that are unused and I don't want to remove them unnecessarily.

- makezero
- misspell
# - mnd
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Quite a few magic numbers exist, so this can be captured in another PR

- predeclared
- promlinter
- staticcheck
- reassign
# - revive
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a large lint, so better done in a separate PR

"github.com/spf13/cobra"
"github.com/spf13/viper"

"github.com/smartcontractkit/timelock-worker/pkg/logger"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixes import ordering

Comment on lines -45 to -48
func (s *integrationTestSuite) Run(name string, subtestFunc func(t *testing.T)) bool {
return s.T().Run(name, subtestFunc)
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This didn't seem to be needed but please correct me if there was a reason to wrap this

@@ -80,9 +76,10 @@ func (s *integrationTestSuite) DeployTimelock(

receipt, err := bind.WaitMined(ctx, client, transaction)
s.Require().NoError(err)
s.Require().Equal(receipt.Status, types.ReceiptStatusSuccessful)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Incorrect ordering

@gustavogama-cll gustavogama-cll added this pull request to the merge queue Nov 20, 2024
Merged via the queue into develop with commit 4e6ed94 Nov 20, 2024
5 checks passed
@gustavogama-cll gustavogama-cll deleted the DPA-1303/cleanup-linters branch November 20, 2024 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants