2022-10-15 09:04:06 +02:00
|
|
|
run:
|
|
|
|
|
# timeout for analysis
|
2025-08-04 12:48:05 +02:00
|
|
|
timeout: 10m
|
2022-10-15 09:04:06 +02:00
|
|
|
|
|
|
|
|
build-tags:
|
|
|
|
|
- autopilotrpc
|
|
|
|
|
- signrpc
|
|
|
|
|
- walletrpc
|
|
|
|
|
- chainrpc
|
|
|
|
|
- invoicesrpc
|
|
|
|
|
- watchtowerrpc
|
|
|
|
|
- neutrinorpc
|
|
|
|
|
- peersrpc
|
2025-01-06 11:38:04 +02:00
|
|
|
- dev
|
2022-10-15 09:04:06 +02:00
|
|
|
|
|
|
|
|
linters-settings:
|
2025-12-09 16:08:26 +00:00
|
|
|
custom:
|
|
|
|
|
ll:
|
|
|
|
|
type: "module"
|
|
|
|
|
description: "Custom lll linter with 'S' log line exclusion."
|
|
|
|
|
settings:
|
|
|
|
|
# Max line length, lines longer will be reported.
|
|
|
|
|
line-length: 80
|
|
|
|
|
# Tab width in spaces.
|
|
|
|
|
tab-width: 8
|
|
|
|
|
# The regex that we will use to detect the start of an `S` log line.
|
|
|
|
|
log-regex: "^\\s*.*(L|l)og\\.(Info|Debug|Trace|Warn|Error|Critical)S\\("
|
2022-10-15 09:04:06 +02:00
|
|
|
govet:
|
|
|
|
|
# Don't report about shadowed variables
|
|
|
|
|
check-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.
|
2025-03-06 18:28:01 +02:00
|
|
|
- G601 # Implicit memory aliasing in for loop.
|
|
|
|
|
- G115 # Integer overflow in conversion.
|
|
|
|
|
|
2022-10-15 09:04:06 +02:00
|
|
|
staticcheck:
|
|
|
|
|
checks: ["-SA1019"]
|
|
|
|
|
|
|
|
|
|
linters:
|
|
|
|
|
enable:
|
2025-12-09 16:08:26 +00:00
|
|
|
- ll
|
2022-10-15 09:04:06 +02:00
|
|
|
- gofmt
|
|
|
|
|
- tagliatelle
|
|
|
|
|
- whitespace
|
|
|
|
|
- gosec
|
|
|
|
|
|
|
|
|
|
issues:
|
|
|
|
|
exclude-rules:
|
|
|
|
|
# Exclude gosec from running for tests so that tests with weak randomness
|
|
|
|
|
# (math/rand) will pass the linter.
|
|
|
|
|
- path: _test\.go
|
|
|
|
|
linters:
|
|
|
|
|
- gosec
|
|
|
|
|
- path: internal/test/.*
|
|
|
|
|
linters:
|
|
|
|
|
- gosec
|
|
|
|
|
# Fix false positives because of build flags in itest directory.
|
|
|
|
|
- path: itest/.*
|
|
|
|
|
linters:
|
|
|
|
|
- unused
|
|
|
|
|
- deadcode
|
|
|
|
|
- varcheck
|
2025-07-11 01:16:52 +02:00
|
|
|
# As the db/sqlcmig6 package has been copied from sqlc generated code,
|
|
|
|
|
# but isn't marked as code generated by sqlc, the code line length in the
|
|
|
|
|
# package will often exceed the lll/ll limit.
|
|
|
|
|
- path: db/sqlcmig6/.*
|
|
|
|
|
linters:
|
|
|
|
|
- lll
|
|
|
|
|
- ll
|