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

Add linter for Temporal interface #13123

Closed
AskAlexSharov opened this issue Dec 16, 2024 · 4 comments
Closed

Add linter for Temporal interface #13123

AskAlexSharov opened this issue Dec 16, 2024 · 4 comments
Assignees
Labels
erigon3 imp2 Medium importance

Comments

@AskAlexSharov
Copy link
Collaborator

  1. find existing linter (in golnagcilint) which will catch such things: https://github.com/erigontech/erigon/pull/13120/files (i'm sure it exists).
  2. add in rules.go match for BeginTemporalRo (and rw).
@sudeepdino008
Copy link
Member

sudeepdino008 commented Dec 17, 2024

PR for 2. - #13136

while 1. is still in progress from alingse.

@sudeepdino008
Copy link
Member

added nilness linter - #13146
it doesn't do alingse's nilnesserr; should we wait for alingse to add it to golanci-lint? Same option is not present. @AskAlexSharov

@AskAlexSharov
Copy link
Collaborator Author

it doesn't do alingse's nilnesserr; should we wait for alingse to add it to golanci-lint? Same option is not present.

sorry, i don't understand the sentence

@sudeepdino008
Copy link
Member

it doesn't do alingse's nilnesserr; should we wait for alingse to add it to golanci-lint? Same option is not present.

sorry, i don't understand the sentence

I mean to catch the issue like https://github.com/erigontech/erigon/pull/13120/files, we need the new nilnesserr linter, which is still in development and not added to golangci-lint. The author said it'll be added once testing is done.

Meanwhile, I added the nilness linter in this PR. It catches redundant patterns like if err != nil where err is always nil or err. But doesn't catch more advanced errors like nilnesserr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
erigon3 imp2 Medium importance
Projects
None yet
Development

No branches or pull requests

2 participants