-
Notifications
You must be signed in to change notification settings - Fork 122
gomod: update to Go 1.24.6 and golangci-lint v2
#993
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
Show all changes
7 commits
Select commit
Hold shift + click to select a range
2ed543b
gomod: upgrade go version and golangci
hieblmi 37d0be2
go.mod: fix asciicheck mod error
hieblmi fe747a0
linter: migrate .golangci.yml from v1 to v2
hieblmi cc26813
test: fix nil dereference
hieblmi bd6271e
loopd: log correct error if daemon start fails
hieblmi e98f733
linter: fix lint issues after linter v2 update
hieblmi 38a4496
loopd: atomic var to enforce daemon singelton
hieblmi 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,149 +1,131 @@ | ||
| version: "2" | ||
| run: | ||
| go: "1.24" | ||
|
|
||
| # timeout for analysis | ||
| timeout: 4m | ||
|
|
||
| go: "1.23" | ||
|
|
||
| linters-settings: | ||
| govet: | ||
| # Don't report about shadowed variables | ||
| shadowing: false | ||
|
|
||
| gofmt: | ||
| # simplify code: gofmt with `-s` option, true by default | ||
| simplify: true | ||
|
|
||
| tagliatelle: | ||
| case: | ||
| rules: | ||
| json: snake | ||
|
|
||
| whitespace: | ||
| multi-func: true | ||
| multi-if: true | ||
|
|
||
| gosec: | ||
| excludes: | ||
| - G402 # Look for bad TLS connection settings. | ||
| - G306 # Poor file permissions used when writing to a new file. | ||
| - G115 # Integer overflow conversion. | ||
|
|
||
| staticcheck: | ||
| checks: [ "-SA1019" ] | ||
|
|
||
| linters: | ||
| enable-all: true | ||
| default: all | ||
| disable: | ||
| # Global variables are used in many places throughout the code base. | ||
| - gochecknoglobals | ||
|
|
||
| # Some lines are over 80 characters on purpose and we don't want to make them | ||
| # even longer by marking them as 'nolint'. | ||
| - lll | ||
|
|
||
| # We want to allow short variable names. | ||
| - varnamelen | ||
|
|
||
| # We want to allow TODOs. | ||
| - godox | ||
|
|
||
| # We have long functions, especially in tests. Moving or renaming those would | ||
| # trigger funlen problems that we may not want to solve at that time. | ||
| - funlen | ||
|
|
||
| # Disable for now as we haven't yet tuned the sensitivity to our codebase | ||
| # yet. Enabling by default for example, would also force new contributors to | ||
| # potentially extensively refactor code, when they want to smaller change to | ||
| # land. | ||
| - gocyclo | ||
| - gocognit | ||
| - containedctx | ||
| - contextcheck | ||
| - cyclop | ||
|
|
||
| # Instances of table driven tests that don't pre-allocate shouldn't trigger | ||
| # the linter. | ||
| - prealloc | ||
|
|
||
| # Init functions are used by loggers throughout the codebase. | ||
| - gochecknoinits | ||
|
|
||
| # Causes stack overflow, see https://github.com/polyfloyd/go-errorlint/issues/19. | ||
| - depguard | ||
| - dogsled | ||
| - err113 | ||
| - errname | ||
| - errorlint | ||
|
|
||
| # New linters that need a code adjustment first. | ||
| - wrapcheck | ||
| - nolintlint | ||
| - paralleltest | ||
| - tparallel | ||
| - testpackage | ||
| - gofumpt | ||
| - exhaustive | ||
| - exhaustruct | ||
| - forcetypeassert | ||
| - funlen | ||
| - gochecknoglobals | ||
| - gochecknoinits | ||
| - gocognit | ||
| - gocyclo | ||
| - godox | ||
| - gomoddirectives | ||
| - inamedparam | ||
| - interfacebloat | ||
| - intrange | ||
| - ireturn | ||
| - maintidx | ||
| - nlreturn | ||
| - dogsled | ||
| - gci | ||
| - containedctx | ||
| - contextcheck | ||
| - errname | ||
| - err113 | ||
| - mnd | ||
| - noctx | ||
| - nestif | ||
| - wsl | ||
| - exhaustive | ||
| - forcetypeassert | ||
| - nilerr | ||
| - nilnil | ||
| - stylecheck | ||
| - thelper | ||
| - revive | ||
| - tagalign | ||
| - depguard | ||
| - interfacebloat | ||
| - inamedparam | ||
| - intrange | ||
| - nlreturn | ||
| - noctx | ||
| - nolintlint | ||
| - paralleltest | ||
| - perfsprint | ||
| - prealloc | ||
| - protogetter | ||
| - revive | ||
| - tagalign | ||
| - testifylint | ||
|
|
||
| # Additions compared to LND | ||
| - exhaustruct | ||
|
|
||
| - testpackage | ||
| - thelper | ||
| - tparallel | ||
| - varnamelen | ||
| - wrapcheck | ||
| - wsl | ||
| - funcorder | ||
| - wsl_v5 | ||
| - noinlineerr | ||
| settings: | ||
| gosec: | ||
| excludes: | ||
| - G402 | ||
| - G306 | ||
| - G115 | ||
| staticcheck: | ||
| checks: | ||
| - -SA1019 | ||
| tagliatelle: | ||
| case: | ||
| rules: | ||
| json: snake | ||
| whitespace: | ||
| multi-if: true | ||
| multi-func: true | ||
| exclusions: | ||
| generated: lax | ||
| presets: | ||
| - comments | ||
| - common-false-positives | ||
| - legacy | ||
| - std-error-handling | ||
| rules: | ||
| - linters: | ||
| - forbidigo | ||
| - gosec | ||
| - unparam | ||
| path: _test\.go | ||
| - linters: | ||
| - gosec | ||
| path: _mock\.go | ||
| - linters: | ||
| - errcheck | ||
| - forbidigo | ||
| path: cmd/loopd/* | ||
| - linters: | ||
| - forbidigo | ||
| path: loopd/* | ||
| - linters: | ||
| - errcheck | ||
| - forbidigo | ||
| path: cmd/loop/* | ||
| - linters: | ||
| - forbidigo | ||
| path: fsm/stateparser/* | ||
| - linters: | ||
| - lll | ||
| path: loopd/config.go | ||
| - linters: | ||
| - lll | ||
| path: loopdb/* | ||
| paths: | ||
| - \.pb\.go$ | ||
| - \.pb\.gw\.go$ | ||
| - third_party$ | ||
| - builtin$ | ||
| - examples$ | ||
| issues: | ||
| # Only show newly introduced problems. | ||
| new-from-rev: 36838cf7f464cf73b0201798063b2caffeae4250 | ||
|
|
||
| exclude-files: | ||
| - "\\.pb\\.go$" | ||
| - "\\.pb\\.gw\\.go$" | ||
|
|
||
| exclude-rules: | ||
| # Allow fmt.Printf() in test files | ||
| - path: _test\.go | ||
| linters: | ||
| - forbidigo | ||
| - unparam | ||
| - gosec | ||
| - path: _mock\.go | ||
| linters: | ||
| - gosec | ||
|
|
||
| # Allow fmt.Printf() in loopd | ||
| - path: cmd/loopd/* | ||
| linters: | ||
| - forbidigo | ||
| - errcheck | ||
| - path: loopd/* | ||
| linters: | ||
| - forbidigo | ||
|
|
||
| # Allow fmt.Printf() in loop | ||
| - path: cmd/loop/* | ||
| linters: | ||
| - forbidigo | ||
| - errcheck | ||
|
|
||
| # Allow fmt.Printf() in stateparser | ||
| - path: fsm/stateparser/* | ||
| linters: | ||
| - forbidigo | ||
| formatters: | ||
| enable: | ||
| - gofmt | ||
| - goimports | ||
| settings: | ||
| gofmt: | ||
| simplify: true | ||
| exclusions: | ||
| generated: lax | ||
| paths: | ||
| - \.pb\.go$ | ||
| - \.pb\.gw\.go$ | ||
| - 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
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.
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.
There is a typo in the commit message: "upgarde"
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.
fixed