diff --git a/.golangci.yml b/.golangci.yml index 4393501e0..4445eb620 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,7 +1,3 @@ -linter-settings: - lll: - line-length: 200 - timeout: 10m issues: @@ -30,8 +26,11 @@ linters: - gosec - copyloopvar # Checks for pointers to enclosing loop variables - tenv # Detects using os.Setenv instead of t.Setenv since Go 1.17 + - lll linters-settings: gosec: excludes: - G304 # Potential file inclusion via variable + lll: + line-length: 200 diff --git a/internal/manager/resource.go b/internal/manager/resource.go index ccf5e5087..56889d578 100644 --- a/internal/manager/resource.go +++ b/internal/manager/resource.go @@ -32,7 +32,12 @@ type ResourceManager struct { } // NewResourceManager returns a ResourceManager with the internal maps initialized. -func NewResourceManager(podLister corev1listers.PodLister, secretLister corev1listers.SecretLister, configMapLister corev1listers.ConfigMapLister, serviceLister corev1listers.ServiceLister) (*ResourceManager, error) { +func NewResourceManager( + podLister corev1listers.PodLister, + secretLister corev1listers.SecretLister, + configMapLister corev1listers.ConfigMapLister, + serviceLister corev1listers.ServiceLister, +) (*ResourceManager, error) { rm := ResourceManager{ podLister: podLister, secretLister: secretLister, diff --git a/node/api/attach.go b/node/api/attach.go index a2a6b13fe..e47e219b9 100644 --- a/node/api/attach.go +++ b/node/api/attach.go @@ -95,7 +95,16 @@ type containerAttachContext struct { // AttachToContainer Implements remotecommand.Attacher // This is called by remotecommand.ServeAttach -func (c *containerAttachContext) AttachToContainer(name string, uid types.UID, container string, in io.Reader, out, err io.WriteCloser, tty bool, resize <-chan remoteutils.TerminalSize, timeout time.Duration) error { +func (c *containerAttachContext) AttachToContainer( + name string, + uid types.UID, + container string, + in io.Reader, + out, err io.WriteCloser, + tty bool, + resize <-chan remoteutils.TerminalSize, + timeout time.Duration, +) error { eio := &execIO{ tty: tty, diff --git a/node/api/exec.go b/node/api/exec.go index 9f493199a..889c319ff 100644 --- a/node/api/exec.go +++ b/node/api/exec.go @@ -171,7 +171,17 @@ type containerExecContext struct { // ExecInContainer Implements remotecommand.Executor // This is called by remotecommand.ServeExec -func (c *containerExecContext) ExecInContainer(name string, uid types.UID, container string, cmd []string, in io.Reader, out, err io.WriteCloser, tty bool, resize <-chan remoteutils.TerminalSize, timeout time.Duration) error { +func (c *containerExecContext) ExecInContainer( + name string, + uid types.UID, + container string, + cmd []string, + in io.Reader, + out, err io.WriteCloser, + tty bool, + resize <-chan remoteutils.TerminalSize, + timeout time.Duration, +) error { eio := &execIO{ tty: tty,