-
Notifications
You must be signed in to change notification settings - Fork 273
chore(linter): update golangci to v2 #1168
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
dcf1eb4
chore(linter): update golangci to v2
7c0c2d2
chore: remove common package from thorclient
a118c73
chore(api): rename util package
ab303ec
chore: add license header
52f15d8
Merge branch 'master' into darren/chore/update-golangci-v2
darrenkel a7c8ed9
chore: add the timeout back to linter
e49a163
chore: add extra formatters
c2e7b23
chore: add golines
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,62 +1,63 @@ | ||
| # Please refer to the official golangci-lint config documentation for more details: | ||
| # https://golangci-lint.run/usage/configuration/ | ||
| # https://github.com/golangci/golangci-lint/blob/master/.golangci.reference.yml | ||
| version: "2" | ||
| run: | ||
| timeout: 10m | ||
| tests: true | ||
| # default is true. Enables skipping of directories: | ||
| # vendor$, third_party$, testdata$, examples$, Godeps$, builtin$ | ||
| exclude-dirs-use-default: true | ||
|
|
||
| linters: | ||
| disable-all: true | ||
| default: none | ||
| enable: | ||
| - goimports | ||
| - gosimple | ||
| - bidichk | ||
| - copyloopvar | ||
| - durationcheck | ||
| - gosec | ||
| - govet | ||
| - ineffassign | ||
| - misspell | ||
| - revive | ||
| - staticcheck | ||
|
otherview marked this conversation as resolved.
|
||
| - unconvert | ||
| - typecheck | ||
| - unused | ||
| - staticcheck | ||
| - bidichk | ||
| - durationcheck | ||
| - copyloopvar | ||
| - whitespace | ||
| - gosec | ||
| - revive | ||
|
|
||
| # - structcheck # lots of false positives | ||
| # - errcheck #lot of false positives | ||
| # - contextcheck | ||
| # - errchkjson # lots of false positives | ||
| # - errorlint # this check crashes | ||
| # - exhaustive # silly check | ||
| # - makezero # false positives | ||
| # - nilerr # several intentional | ||
|
|
||
| linters-settings: | ||
| gofmt: | ||
| simplify: true | ||
| gosec: | ||
| excludes: | ||
| - G115 | ||
| - G406 # ignore ripe160 deprecation | ||
| - G507 # ignore ripe160 deprecation | ||
| revive: | ||
| settings: | ||
| gosec: | ||
| excludes: | ||
| - G115 | ||
| - G406 | ||
| - G507 | ||
| revive: | ||
| rules: | ||
| - name: var-naming | ||
| arguments: | ||
| - [] | ||
| - [] | ||
| - - upperCaseConst: true | ||
| severity: warning | ||
| disabled: false | ||
| exclude: | ||
| - "" | ||
| exclusions: | ||
|
otherview marked this conversation as resolved.
|
||
| generated: lax | ||
| presets: | ||
| - comments | ||
| - common-false-positives | ||
| - legacy | ||
| - std-error-handling | ||
| rules: | ||
| - name: var-naming | ||
| severity: warning | ||
| disabled: false | ||
| exclude: [""] | ||
| arguments: | ||
| - [] # AllowList | ||
| - [] # DenyList | ||
| - - upperCaseConst: true # Extra parameter (upperCaseConst|skipPackageNameChecks) | ||
|
|
||
| - path: vm/contracts.go | ||
| text: 'SA1019: "golang.org/x/crypto/ripemd160" is deprecated: RIPEMD-160 is a legacy hash and should not be used for new applications.' | ||
| paths: | ||
| - third_party$ | ||
| - builtin$ | ||
| - examples$ | ||
| issues: | ||
| max-issues-per-linter: 1000 | ||
| exclude-rules: | ||
| - path: vm/contracts.go | ||
| text: 'SA1019: "golang.org/x/crypto/ripemd160" is deprecated: RIPEMD-160 is a legacy hash and should not be used for new applications.' | ||
| formatters: | ||
| enable: | ||
| - goimports | ||
| settings: | ||
| gofmt: | ||
| simplify: true | ||
| exclusions: | ||
| generated: lax | ||
| paths: | ||
| - third_party$ | ||
| - builtin$ | ||
| - examples$ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.