Add Stutter linter

This also adds a bunch of nolints for the node package which
has a ton of stuttering. Perhaps something to mitigate in another
iteration.
This commit is contained in:
Sargun Dhillon
2020-12-07 01:43:38 -08:00
parent d29adf5ce3
commit 0d1f6f1625
3 changed files with 5 additions and 8 deletions

View File

@@ -46,7 +46,7 @@ const (
//
// Note: Implementers can choose to manage a node themselves, in which case
// it is not needed to provide an implementation for this interface.
type NodeProvider interface {
type NodeProvider interface { // nolint:golint
// Ping checks if the node is still active.
// This is intended to be lightweight as it will be called periodically as a
// heartbeat to keep the node marked as ready in Kubernetes.
@@ -96,7 +96,7 @@ func NewNodeController(p NodeProvider, node *corev1.Node, nodes v1.NodeInterface
}
// NodeControllerOpt are the functional options used for configuring a node
type NodeControllerOpt func(*NodeController) error
type NodeControllerOpt func(*NodeController) error // nolint:golint
// WithNodeEnableLeaseV1Beta1 enables support for v1beta1 leases.
// If client is nil, leases will not be enabled.
@@ -174,7 +174,7 @@ type ErrorHandler func(context.Context, error) error
// NodeController deals with creating and managing a node object in Kubernetes.
// It can register a node with Kubernetes and periodically update its status.
// NodeController manages a single node entity.
type NodeController struct {
type NodeController struct { // nolint:golint
p NodeProvider
// serverNode should only be written to on initialization, or as the result of node creation.