2019-07-22 11:05:57 +02:00
|
|
|
run:
|
|
|
|
# timeout for analysis
|
2020-09-04 14:10:03 +02:00
|
|
|
deadline: 10m
|
2019-09-11 14:21:04 +02:00
|
|
|
|
2021-07-27 13:00:00 +02:00
|
|
|
# Skip autogenerated files for mobile and gRPC.
|
2019-09-17 15:21:31 +02:00
|
|
|
skip-files:
|
|
|
|
- "mobile\\/.*generated\\.go"
|
2021-07-27 13:00:00 +02:00
|
|
|
- "\\.pb\\.go$"
|
|
|
|
- "\\.pb\\.gw\\.go$"
|
2019-09-17 15:21:31 +02:00
|
|
|
|
2019-10-24 12:04:26 +02:00
|
|
|
skip-dirs:
|
|
|
|
- channeldb/migration_01_to_11
|
2021-01-15 11:12:08 +01:00
|
|
|
- channeldb/migration/lnwire21
|
2019-10-24 12:04:26 +02:00
|
|
|
|
2019-09-10 12:35:31 +02:00
|
|
|
build-tags:
|
|
|
|
- autopilotrpc
|
|
|
|
- chainrpc
|
|
|
|
- invoicesrpc
|
|
|
|
- signrpc
|
|
|
|
- walletrpc
|
|
|
|
- watchtowerrpc
|
2019-07-22 11:05:57 +02:00
|
|
|
|
|
|
|
linters-settings:
|
|
|
|
govet:
|
|
|
|
# Don't report about shadowed variables
|
|
|
|
check-shadowing: false
|
|
|
|
gofmt:
|
|
|
|
# simplify code: gofmt with `-s` option, true by default
|
|
|
|
simplify: true
|
|
|
|
|
|
|
|
linters:
|
2019-09-11 14:21:04 +02:00
|
|
|
enable-all: true
|
|
|
|
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 don't care (enough) about misaligned structs to lint that.
|
|
|
|
- maligned
|
|
|
|
|
2019-09-13 11:15:43 +02:00
|
|
|
# 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
|
|
|
|
|
2019-09-17 05:46:01 +02:00
|
|
|
# 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
|
|
|
|
|
|
|
|
# Instances of table driven tests that don't pre-allocate shouldn't trigger
|
|
|
|
# the linter.
|
|
|
|
- prealloc
|
|
|
|
|
2019-08-08 19:39:38 +02:00
|
|
|
# Init functions are used by loggers throughout the codebase.
|
|
|
|
- gochecknoinits
|
|
|
|
|
2019-09-11 14:21:04 +02:00
|
|
|
issues:
|
|
|
|
# Only show newly introduced problems.
|
|
|
|
new-from-rev: 01f696afce2f9c0d4ed854edefa3846891d01d8a
|
2019-12-03 10:38:21 +01:00
|
|
|
|
|
|
|
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
|
2020-01-10 15:27:50 +01:00
|
|
|
|
|
|
|
# Fix false positives because of build flags in itest directory.
|
|
|
|
- path: lntest/itest/.*
|
|
|
|
linters:
|
|
|
|
- unused
|
|
|
|
- deadcode
|
|
|
|
- unparam
|
|
|
|
- govet
|