Skip to content

Commit

Permalink
Merge pull request #977 from ellemouton/lll
Browse files Browse the repository at this point in the history
golangci: enable line length linter
  • Loading branch information
ellemouton authored Feb 14, 2025
2 parents 7463cd6 + a22689c commit 1a389d1
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ linters-settings:

linters:
enable:
- lll
- gofmt
- tagliatelle
- whitespace
Expand Down
2 changes: 2 additions & 0 deletions autopilotserver/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ var ErrVersionIncompatible = fmt.Errorf("litd version is not compatible " +
"with the minimum version required by the autopilot server")

// Config holds the configuration options for the autopilot server client.
//
//nolint:lll
type Config struct {
// Disable will disable the autopilot client.
Disable bool `long:"disable" description:"disable the autopilot client"`
Expand Down
2 changes: 2 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ var (
// Config is the main configuration struct of lightning-terminal. It contains
// all config items of its enveloping subservers, each prefixed with their
// daemon's short name.
//
//nolint:lll
type Config struct {
ShowVersion bool `long:"version" description:"Display version information and exit."`

Expand Down
4 changes: 4 additions & 0 deletions firewall/config.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
package firewall

// Config holds all config options for the firewall.
//
//nolint:lll
type Config struct {
RequestLogger *RequestLoggerConfig `group:"request-logger" namespace:"request-logger" description:"request logger settings"`
}

// RequestLoggerConfig holds all the config options for the request logger.
//
//nolint:lll
type RequestLoggerConfig struct {
RequestLoggerLevel RequestLoggerLevel `long:"level" description:"Set the request logger level. Options include 'all', 'full' and 'interceptor''"`
}
Expand Down
2 changes: 2 additions & 0 deletions firewall/privacy_mapper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1308,6 +1308,8 @@ func TestHideBool(t *testing.T) {

// TestObfuscateConfig tests that we substitute substrings in the config
// correctly.
//
//nolint:lll
func TestObfuscateConfig(t *testing.T) {
tests := []struct {
name string
Expand Down
2 changes: 2 additions & 0 deletions rpcmiddleware/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ const (
)

// Config is the configuration struct for the RPC middleware.
//
//nolint:lll
type Config struct {
Disabled bool `long:"disabled" description:"Disable the RPC middleware"`
InterceptTimeout time.Duration `long:"intercept-timeout" description:"The maximum time the RPC middleware is allowed to take for intercepting each RPC request"`
Expand Down
4 changes: 4 additions & 0 deletions subservers/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package subservers

// RemoteConfig holds the configuration parameters that are needed when running
// LiT in the "remote" lnd mode.
//
//nolint:lll
type RemoteConfig struct {
LitLogDir string `long:"lit-logdir" description:"For lnd remote mode only: Directory to log output."`
LitMaxLogFiles int `long:"lit-maxlogfiles" description:"For lnd remote mode only: Maximum logfiles to keep (0 for no rotation)"`
Expand All @@ -18,6 +20,8 @@ type RemoteConfig struct {

// RemoteDaemonConfig holds the configuration parameters that are needed to
// connect to a remote daemon like lnd for example.
//
//nolint:lll
type RemoteDaemonConfig struct {
// RPCServer is host:port that the remote daemon's RPC server is
// listening on.
Expand Down

0 comments on commit 1a389d1

Please sign in to comment.