Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ defaults:
shell: bash

env:
GO_VERSION: 1.23.6
GO_VERSION: 1.24.6

jobs:
build:
Expand Down
204 changes: 110 additions & 94 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,106 +1,122 @@
version: "2"
run:
# timeout for analysis
timeout: 4m
go: "1.23"
go: "1.24"
linters:
default: all
disable:
# Global variables are used in many places throughout the code base.
- gochecknoglobals

linters-settings:
lll:
line-length: 80
govet:
# Don't report about shadowed variables
shadow: 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"]
revive:
rules:
- name: exported # To enforce conventions around exported comments.
# We want to allow short variable names.
- varnamelen

issues:
include:
- EXC0012 # revive: Exported vars should have a docstring.
- EXC0014 # revive: Exported vars's docstring should start with its name.
# We want to allow TODOs.
- godox

linters:
enable-all: true
disable:
# Global variables are used in many places throughout the code base.
- gochecknoglobals
# 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

# We want to allow short variable names.
- varnamelen
# 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
- cyclop

# We want to allow TODOs.
- godox
# Instances of table driven tests that don't pre-allocate shouldn't trigger
# the linter.
- prealloc

# 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
# Init functions are used by loggers throughout the codebase.
- gochecknoinits

# 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
- cyclop
# Causes stack overflow, see https://github.com/polyfloyd/go-errorlint/issues/19.
- errorlint

# Instances of table driven tests that don't pre-allocate shouldn't trigger
# the linter.
- prealloc
# Don't forbid an empty line after function signature. We add it in multi-line case.
- wsl_v5

# Init functions are used by loggers throughout the codebase.
- gochecknoinits
# Don't forbid "if err := ...; err != nil" checks.
- noinlineerr

# Causes stack overflow, see https://github.com/polyfloyd/go-errorlint/issues/19.
- errorlint
# Don't demand any particular functions order.
- funcorder

# New linters that need a code adjustment first.
- wrapcheck
- nolintlint
- paralleltest
- tparallel
- testpackage
- gofumpt
- gomoddirectives
- ireturn
- maintidx
- nlreturn
- dogsled
- gci
- containedctx
- contextcheck
- errname
- err113
- mnd
- noctx
- nestif
- wsl
- exhaustive
- forcetypeassert
- nilerr
- nilnil
- stylecheck
- thelper
- exhaustruct
- importas
- interfacebloat
- protogetter
- depguard
- mnd
- perfsprint
- inamedparam
# New linters that need a code adjustment first.
- containedctx
- contextcheck
- depguard
- dogsled
- err113
- errname
- exhaustive
- exhaustruct
- forcetypeassert
- gomoddirectives
- importas
- inamedparam
- interfacebloat
- ireturn
- maintidx
- mnd
- nestif
- nilerr
- nilnil
- nlreturn
- noctx
- nolintlint
- paralleltest
- perfsprint
- protogetter
- testpackage
- thelper
- tparallel
- wrapcheck
- wsl
settings:
gosec:
excludes:
- G402 # Look for bad TLS connection settings.
- G306 # Poor file permissions used when writing to a new file.
- G115 # Integer overflow conversion.
lll:
line-length: 80
revive:
rules:
- name: exported # To enforce conventions around exported comments.
staticcheck:
checks:
- -SA1019
tagliatelle:
case:
rules:
json: snake
whitespace:
multi-if: true
multi-func: true
exclusions:
generated: lax
presets:
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gofmt
- goimports
settings:
gofmt:
# simplify code: gofmt with `-s` option, true by default
simplify: true
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
47 changes: 23 additions & 24 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ require (
github.com/btcsuite/btcd/btcutil v1.1.5
github.com/btcsuite/btcd/btcutil/psbt v1.1.8
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0
github.com/btcsuite/btclog/v2 v2.0.1-0.20250110154127-3ae4bf1cb318
github.com/btcsuite/btcwallet v0.16.13
github.com/btcsuite/btclog/v2 v2.0.1-0.20250728225537-6090e87c6c5b
github.com/btcsuite/btcwallet v0.16.15-0.20250811092146-05b3a40651e6
github.com/btcsuite/btcwallet/wtxmgr v1.5.6
github.com/lightningnetwork/lnd v0.19.0-beta
github.com/lightningnetwork/lnd v0.19.0-beta.rc5.0.20250905045430-9d74ec47701c
github.com/lightningnetwork/lnd/kvdb v1.4.16
github.com/stretchr/testify v1.10.0
google.golang.org/grpc v1.59.0
Expand Down Expand Up @@ -42,22 +42,20 @@ require (
github.com/decred/dcrd/crypto/blake256 v1.0.1 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
github.com/decred/dcrd/lru v1.1.2 // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/docker/cli v28.0.1+incompatible // indirect
github.com/docker/docker v28.0.1+incompatible // indirect
github.com/docker/cli v28.1.1+incompatible // indirect
github.com/docker/docker v28.1.1+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/fergusstrange/embedded-postgres v1.25.0 // indirect
github.com/go-errors/errors v1.0.1 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
github.com/gofrs/uuid v4.2.0+incompatible // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.2 // indirect
github.com/golang-migrate/migrate/v4 v4.17.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/btree v1.0.1 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
Expand All @@ -76,11 +74,11 @@ require (
github.com/jackc/pgio v1.0.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgproto3/v2 v2.3.3 // indirect
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
github.com/jackc/pgtype v1.14.0 // indirect
github.com/jackc/pgx/v4 v4.18.2 // indirect
github.com/jackc/pgx/v5 v5.5.4 // indirect
github.com/jackc/puddle/v2 v2.2.1 // indirect
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
github.com/jackc/pgtype v1.14.4 // indirect
github.com/jackc/pgx/v4 v4.18.3 // indirect
github.com/jackc/pgx/v5 v5.7.4 // indirect
github.com/jackc/puddle/v2 v2.2.2 // indirect
github.com/jessevdk/go-flags v1.4.0 // indirect
github.com/jonboulle/clockwork v0.2.2 // indirect
github.com/jrick/logrotate v1.1.2 // indirect
Expand All @@ -99,14 +97,14 @@ require (
github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf // indirect
github.com/lightninglabs/neutrino v0.16.1 // indirect
github.com/lightninglabs/neutrino/cache v1.1.2 // indirect
github.com/lightningnetwork/lightning-onion v1.2.1-0.20240712235311-98bd56499dfb // indirect
github.com/lightningnetwork/lightning-onion v1.2.1-0.20240815225420-8b40adf04ab9 // indirect
github.com/lightningnetwork/lnd/clock v1.1.1 // indirect
github.com/lightningnetwork/lnd/fn/v2 v2.0.8 // indirect
github.com/lightningnetwork/lnd/healthcheck v1.2.6 // indirect
github.com/lightningnetwork/lnd/queue v1.1.1 // indirect
github.com/lightningnetwork/lnd/sqldb v1.0.9 // indirect
github.com/lightningnetwork/lnd/sqldb v1.0.11-0.20250905045430-9d74ec47701c // indirect
github.com/lightningnetwork/lnd/ticker v1.1.1 // indirect
github.com/lightningnetwork/lnd/tlv v1.3.1 // indirect
github.com/lightningnetwork/lnd/tlv v1.3.2 // indirect
github.com/lightningnetwork/lnd/tor v1.1.6 // indirect
github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
Expand Down Expand Up @@ -151,7 +149,6 @@ require (
go.etcd.io/etcd/server/v3 v3.5.12 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect
go.opentelemetry.io/otel v1.35.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 // indirect
Expand All @@ -162,14 +159,14 @@ require (
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.17.0 // indirect
golang.org/x/crypto v0.36.0 // indirect
golang.org/x/crypto v0.37.0 // indirect
golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/sync v0.12.0 // indirect
golang.org/x/sys v0.31.0 // indirect
golang.org/x/term v0.30.0 // indirect
golang.org/x/text v0.23.0 // indirect
golang.org/x/net v0.39.0 // indirect
golang.org/x/sync v0.13.0 // indirect
golang.org/x/sys v0.32.0 // indirect
golang.org/x/term v0.31.0 // indirect
golang.org/x/text v0.24.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b // indirect
Expand All @@ -195,4 +192,6 @@ require (
// allows us to specify that as an option.
replace google.golang.org/protobuf => github.com/lightninglabs/protobuf-go-hex-display v1.33.0-hex-display

go 1.23.6
replace github.com/lightningnetwork/lnd => github.com/starius/lnd v0.19.2-beta.kweight-selection2

go 1.24.6
Loading