-
-
Notifications
You must be signed in to change notification settings - Fork 27
upgrade golangci-lint tool and enable more tools #214
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 all commits
Commits
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,115 +1,131 @@ | ||
| version: "2" | ||
| run: | ||
| timeout: 5m | ||
| go: '1.21' | ||
|
|
||
| linters-settings: | ||
| govet: | ||
| enable: | ||
| - shadow | ||
| revive: | ||
| min-confidence: 0.8 | ||
| gocyclo: | ||
| min-complexity: 15 | ||
| dupl: | ||
| threshold: 100 | ||
| goconst: | ||
| min-len: 2 | ||
| min-occurrences: 2 | ||
| misspell: | ||
| locale: US | ||
| lll: | ||
| line-length: 140 | ||
| goimports: | ||
| local-prefixes: github.com/ChristopherHX/github-act-runner | ||
| gocritic: | ||
| enabled-tags: | ||
| - diagnostic | ||
| - experimental | ||
| - opinionated | ||
| - performance | ||
| - style | ||
| disabled-checks: | ||
| - dupImport # https://github.com/go-critic/go-critic/issues/845 | ||
| - ifElseChain | ||
| - octalLiteral | ||
| - whyNoLint | ||
| - wrapperFunc | ||
|
|
||
| go: "1.21" | ||
| linters: | ||
| enable: | ||
| - asciicheck | ||
| - bidichk | ||
| - bodyclose | ||
| # - depguard # Disabled for now as it's too restrictive | ||
| - copyloopvar | ||
| - dogsled | ||
| - dupl | ||
| - errcheck | ||
| - copyloopvar # replaces exportloopref for Go 1.22+ | ||
| - durationcheck | ||
| - errname | ||
| - errorlint | ||
| - exhaustive | ||
| - gocheckcompilerdirectives | ||
| - goconst | ||
| - gocritic | ||
| - gofmt | ||
| - goimports | ||
| - revive # replaces golint | ||
| - mnd # replaces gomnd | ||
| - goprintffuncname | ||
| - gosec | ||
| - gosimple | ||
| - govet | ||
| - ineffassign | ||
| - importas | ||
| - lll | ||
| - makezero | ||
| - misspell | ||
| - mnd | ||
| - nakedret | ||
| - nilerr | ||
| - noctx | ||
| - nolintlint | ||
| - prealloc | ||
| - revive | ||
| - rowserrcheck | ||
| - staticcheck | ||
| - stylecheck | ||
| - typecheck | ||
| - tparallel | ||
| - unconvert | ||
| - unparam | ||
| - unused | ||
| - usestdlibvars | ||
| - whitespace | ||
|
|
||
| settings: | ||
| dupl: | ||
| threshold: 100 | ||
| goconst: | ||
| min-len: 2 | ||
| min-occurrences: 2 | ||
| gocritic: | ||
| disabled-checks: | ||
| - dupImport | ||
| - ifElseChain | ||
| - octalLiteral | ||
| - whyNoLint | ||
| - wrapperFunc | ||
| enabled-tags: | ||
| - diagnostic | ||
| - experimental | ||
| - opinionated | ||
| - performance | ||
| - style | ||
| gocyclo: | ||
| min-complexity: 15 | ||
| govet: | ||
| enable: | ||
| - shadow | ||
| lll: | ||
| line-length: 140 | ||
| misspell: | ||
| locale: US | ||
| revive: | ||
| confidence: 0.8 | ||
| exclusions: | ||
| generated: lax | ||
| rules: | ||
| - linters: | ||
| - gocritic | ||
| - gosec | ||
| - mnd | ||
| path: _test\.go | ||
| - linters: | ||
| - mnd | ||
| path: main\.go | ||
| - linters: | ||
| - revive | ||
| path: protocol/ | ||
| - linters: | ||
| - gosec | ||
| text: weak cryptographic primitive | ||
| - linters: | ||
| - gosec | ||
| text: Use of weak random number generator | ||
| - linters: | ||
| - staticcheck | ||
| text: at least one file in a package should have a package comment | ||
| - linters: | ||
| - staticcheck | ||
| text: should have a package comment | ||
| - linters: | ||
| - revive | ||
| text: 'package-comments: should have a package comment' | ||
| - linters: | ||
| - revive | ||
| text: exported function .* should have comment or be unexported | ||
| - linters: | ||
| - revive | ||
| text: exported method .* should have comment or be unexported | ||
| - linters: | ||
| - revive | ||
| text: exported type .* should have comment or be unexported | ||
| - linters: | ||
| - revive | ||
| text: exported var .* should have comment or be unexported | ||
| paths: | ||
| - third_party$ | ||
| - builtin$ | ||
| - examples$ | ||
| issues: | ||
| exclude-rules: | ||
| - path: _test\.go | ||
| linters: | ||
| - mnd | ||
| - gocritic | ||
| - gosec | ||
| - path: main\.go | ||
| linters: | ||
| - mnd | ||
| - path: protocol/ | ||
| linters: | ||
| - revive # Protocol has many generated-like structs | ||
| - text: "weak cryptographic primitive" | ||
| linters: | ||
| - gosec | ||
| - text: "Use of weak random number generator" | ||
| linters: | ||
| - gosec | ||
| - text: "at least one file in a package should have a package comment" | ||
| linters: | ||
| - stylecheck | ||
| - text: "should have a package comment" | ||
| linters: | ||
| - stylecheck | ||
| - text: "package-comments: should have a package comment" | ||
| linters: | ||
| - revive | ||
| - text: "exported function .* should have comment or be unexported" | ||
| linters: | ||
| - revive | ||
| - text: "exported method .* should have comment or be unexported" | ||
| linters: | ||
| - revive | ||
| - text: "exported type .* should have comment or be unexported" | ||
| linters: | ||
| - revive | ||
| - text: "exported var .* should have comment or be unexported" | ||
| linters: | ||
| - revive | ||
|
|
||
| exclude-use-default: false | ||
| max-issues-per-linter: 0 | ||
| max-same-issues: 0 | ||
| formatters: | ||
| enable: | ||
| - gofmt | ||
| - gofumpt | ||
| - goimports | ||
| settings: | ||
| goimports: | ||
| local-prefixes: | ||
| - github.com/ChristopherHX/github-act-runner | ||
| 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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
panic / fatal are not part of the GitHub Action Spec, but do not harm if seen...