mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
This commit introduces the `sqlcmig6` package, which at the time of this commit contains the same queries and models as `sqlc` package. Importantly though, once the kvdb to sql migration is made available in production, the `sqlcmig6` package will not change, as it is intended to represent the sql db as it was at the time of the migration. The sqlcmig6 package is therefore intended to be used in the kvdb to sql migration code, as it is will always be compatible with the sql database when all sql migrations prior to the kvdb to sql migration are applied. When additional sql migrations are added in the future, they may effect the `sqlc` package in such a way that the standard `sqlc` queries and models aren't compatible with kvdb to sql migration code any longer. By preserving the `sqlcmig6` package, we ensure that the kvdb to sql migration code can always use the same queries and models that were available at the time of the migration, even if the `sqlc` package changes in the future. Note that the `sqlcmig6` package have not been generated by `sqlc` (the queries and models are copied from the `sqlc` package), as it is not intended to be changed in the future.
81 lines
1.9 KiB
YAML
81 lines
1.9 KiB
YAML
run:
|
|
# timeout for analysis
|
|
timeout: 10m
|
|
|
|
build-tags:
|
|
- autopilotrpc
|
|
- signrpc
|
|
- walletrpc
|
|
- chainrpc
|
|
- invoicesrpc
|
|
- watchtowerrpc
|
|
- neutrinorpc
|
|
- peersrpc
|
|
- dev
|
|
|
|
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\\("
|
|
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.
|
|
|
|
staticcheck:
|
|
checks: ["-SA1019"]
|
|
|
|
linters:
|
|
enable:
|
|
- ll
|
|
- 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
|