multi: skip checking long lines for config files

This commit is contained in:
yyforyongyu 2022-10-20 16:48:19 +08:00
parent 3e593be053
commit 4db6617d45
No known key found for this signature in database
GPG key ID: 9BCD95C4FF296868
25 changed files with 48 additions and 0 deletions

View file

@ -253,6 +253,8 @@ var (
//
// See LoadConfig for further details regarding the configuration
// loading+parsing process.
//
// nolint:lll
type Config struct {
ShowVersion bool `short:"V" long:"version" description:"Display version information and exit"`

View file

@ -3,6 +3,8 @@ package etcd
import "fmt"
// Config holds etcd configuration alongside with configuration related to our higher level interface.
//
// nolint:lll
type Config struct {
Embedded bool `long:"embedded" description:"Use embedded etcd instance instead of the external one. Note: use for testing only."`

View file

@ -3,6 +3,8 @@ package postgres
import "time"
// Config holds postgres configuration data.
//
// nolint:lll
type Config struct {
Dsn string `long:"dsn" description:"Database connection string."`
Timeout time.Duration `long:"timeout" description:"Database connection timeout. Set to zero to disable."`

View file

@ -1,6 +1,8 @@
package lncfg
// AutoPilot holds the configuration options for the daemon's autopilot.
//
// nolint:lll
type AutoPilot struct {
Active bool `long:"active" description:"If the autopilot agent should be active or not."`
Heuristic map[string]float64 `long:"heuristic" description:"Heuristic to activate, and the weight to give it during scoring."`

View file

@ -4,6 +4,8 @@ import "time"
// Bitcoind holds the configuration options for the daemon's connection to
// bitcoind.
//
// nolint:lll
type Bitcoind struct {
Dir string `long:"dir" description:"The base directory that contains the node's data, logs, configuration file, etc."`
ConfigPath string `long:"config" description:"Configuration filepath. If not set, will default to the default filename under 'dir'."`

View file

@ -1,6 +1,8 @@
package lncfg
// Btcd holds the configuration options for the daemon's connection to btcd.
//
// nolint:lll
type Btcd struct {
Dir string `long:"dir" description:"The base directory that contains the node's data, logs, configuration file, etc."`
RPCHost string `long:"rpchost" description:"The daemon's rpc listening address. If a port is omitted, then the default port for the selected chain parameters will be used."`

View file

@ -20,6 +20,8 @@ const (
)
// Caches holds the configuration for various caches within lnd.
//
// nolint:lll
type Caches struct {
// RejectCacheSize is the maximum number of entries stored in lnd's
// reject cache, which is used for efficiently rejecting gossip updates.

View file

@ -7,6 +7,8 @@ import (
)
// Chain holds the configuration options for the daemon's chain settings.
//
// nolint:lll
type Chain struct {
Active bool `long:"active" description:"If the chain should be active or not."`
ChainDir string `long:"chaindir" description:"The directory to store the chain's data within."`

View file

@ -50,6 +50,8 @@ const (
)
// DB holds database configuration for LND.
//
// nolint:lll
type DB struct {
Backend string `long:"backend" description:"The selected database backend."`

View file

@ -7,6 +7,7 @@ import (
"github.com/lightningnetwork/lnd/routing/route"
)
// nolint:lll
type Gossip struct {
PinnedSyncersRaw []string `long:"pinned-syncers" description:"A set of peers that should always remain in an active sync state, which can be used to closely synchronize the routing tables of two nodes. The value should be comma separated list of hex-encoded pubkeys. Connected peers matching this pubkey will remain active for the duration of the connection and not count towards the NumActiveSyncer count."`

View file

@ -22,6 +22,8 @@ var (
// HealthCheckConfig contains the configuration for the different health checks
// the lnd runs.
//
// nolint:lll
type HealthCheckConfig struct {
ChainCheck *CheckConfig `group:"chainbackend" namespace:"chainbackend"`

View file

@ -7,6 +7,8 @@ package lncfg
const DefaultHoldInvoiceExpiryDelta = DefaultIncomingBroadcastDelta + 2
// Invoices holds the configuration options for invoices.
//
// nolint:lll
type Invoices struct {
HoldExpiryDelta uint32 `long:"holdexpirydelta" description:"The number of blocks before a hold invoice's htlc expires that the invoice should be canceled to prevent a force close. Force closes will not be prevented if this value is not greater than DefaultIncomingBroadcastDelta."`
}

View file

@ -5,6 +5,8 @@ package lncfg
// Prometheus is the set of configuration data that specifies the listening
// address of the Prometheus exporter.
//
// nolint:lll
type Prometheus struct {
// Listen is the listening address that we should use to allow the main
// Prometheus server to scrape our metrics.

View file

@ -4,6 +4,8 @@ import "time"
// Neutrino holds the configuration options for the daemon's connection to
// neutrino.
//
// nolint:lll
type Neutrino struct {
AddPeers []string `short:"a" long:"addpeer" description:"Add a peer to connect with at startup"`
ConnectPeers []string `long:"connect" description:"Connect only to the specified peers at startup"`

View file

@ -6,6 +6,8 @@ package lncfg
// ProtocolOptions is a struct that we use to be able to test backwards
// compatibility of protocol additions, while defaulting to the latest within
// lnd, or to enable experimental protocol changes.
//
// nolint:lll
type ProtocolOptions struct {
// LegacyProtocol is a sub-config that houses all the legacy protocol
// options. These are mostly used for integration tests as most modern

View file

@ -6,6 +6,8 @@ package lncfg
// Legacy is a sub-config that houses all the legacy protocol options. These
// are mostly used for integration tests as most modern nodes should always run
// with them on by default.
//
// nolint:lll
type LegacyProtocol struct {
// LegacyOnionFormat if set to true, then we won't signal
// TLVOnionPayloadOptional. As a result, nodes that include us in the

View file

@ -6,6 +6,8 @@ package lncfg
// ProtocolOptions is a struct that we use to be able to test backwards
// compatibility of protocol additions, while defaulting to the latest within
// lnd, or to enable experimental protocol changes.
//
// nolint:lll
type ProtocolOptions struct {
// LegacyProtocol is a sub-config that houses all the legacy protocol
// options. These are mostly used for integration tests as most modern

View file

@ -12,6 +12,8 @@ const (
)
// RemoteSigner holds the configuration options for a remote RPC signer.
//
// nolint:lll
type RemoteSigner struct {
Enable bool `long:"enable" description:"Use a remote signer for signing any on-chain related transactions or messages. Only recommended if local wallet is initialized as watch-only. Remote signer must use the same seed/root key as the local watch-only wallet but must have private keys."`
RPCHost string `long:"rpchost" description:"The remote signer's RPC host:port"`

View file

@ -1,6 +1,8 @@
package lncfg
// Routing holds the configuration options for routing.
//
// nolint:lll
type Routing struct {
AssumeChannelValid bool `long:"assumechanvalid" description:"Skip checking channel spentness during graph validation. This speedup comes at the risk of using an unvalidated view of the network for routing. (default: false)"`

View file

@ -15,6 +15,8 @@ const (
)
// RPCMiddleware holds the configuration for RPC interception middleware.
//
// nolint:lll
type RPCMiddleware struct {
Enable bool `long:"enable" description:"Enable the RPC middleware interceptor functionality."`
InterceptTimeout time.Duration `long:"intercepttimeout" description:"Time after which a RPC middleware intercept request will time out and return an error if it hasn't yet received a response."`

View file

@ -5,6 +5,7 @@ import (
"time"
)
// nolint:lll
type Sweeper struct {
BatchWindowDuration time.Duration `long:"batchwindowduration" description:"Duration of the sweep batch window. The sweep is held back during the batch window to allow more inputs to be added and thereby lower the fee per input."`
}

View file

@ -1,6 +1,8 @@
package lncfg
// Tor holds the configuration options for the daemon's connection to tor.
//
// nolint:lll
type Tor struct {
Active bool `long:"active" description:"Allow outbound and inbound connections to be routed through Tor"`
SOCKS string `long:"socks" description:"The host:port that Tor's exposed SOCKS5 proxy is listening on"`

View file

@ -4,6 +4,8 @@ import "github.com/lightningnetwork/lnd/watchtower"
// Watchtower holds the daemon specific configuration parameters for running a
// watchtower that shares resources with the daemon.
//
// nolint:lll
type Watchtower struct {
Active bool `long:"active" description:"If the watchtower should be active or not"`

View file

@ -18,6 +18,8 @@ const (
// Workers exposes CLI configuration for turning resources consumed by worker
// pools.
//
// nolint:lll
type Workers struct {
// Read is the maximum number of concurrent read pool workers.
Read int `long:"read" description:"Maximum number of concurrent read pool workers. This number should be proportional to the number of peers."`

View file

@ -3,6 +3,8 @@ package lncfg
import "fmt"
// WtClient holds the configuration options for the daemon's watchtower client.
//
// nolint:lll
type WtClient struct {
// Active determines whether a watchtower client should be created to
// back up channel states with registered watchtowers.