lightning-terminal/.golangci.yml

82 lines
1.9 KiB
YAML
Raw Permalink Normal View History

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
- dev
2022-10-15 09:04:06 +02:00
linters-settings:
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.
- 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:
- 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
# 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