migrate nolint coments to golangci-lint

This commit is contained in:
Antonio Ojea
2021-11-16 16:57:58 +01:00
parent 272b31da50
commit d126b14838
22 changed files with 41 additions and 34 deletions

View File

@@ -53,7 +53,7 @@ type CPUManagerCheckpointV2 = CPUManagerCheckpoint
// NewCPUManagerCheckpoint returns an instance of Checkpoint
func NewCPUManagerCheckpoint() *CPUManagerCheckpoint {
//lint:ignore unexported-type-in-api user-facing error message
//nolint:staticcheck // unexported-type-in-api user-facing error message
return newCPUManagerCheckpointV2()
}

View File

@@ -54,7 +54,7 @@ func NewCheckpointState(stateDir, checkpointName, policyName string, initialCont
}
if err := stateCheckpoint.restoreState(); err != nil {
//lint:ignore ST1005 user-facing error message
//nolint:staticcheck // ST1005 user-facing error message
return nil, fmt.Errorf("could not restore state from checkpoint: %v, please drain this node and delete the CPU manager checkpoint file %q before restarting Kubelet",
err, path.Join(stateDir, checkpointName))
}

View File

@@ -35,7 +35,7 @@ type MemoryManagerCheckpoint struct {
// NewMemoryManagerCheckpoint returns an instance of Checkpoint
func NewMemoryManagerCheckpoint() *MemoryManagerCheckpoint {
//lint:ignore unexported-type-in-api user-facing error message
//nolint:staticcheck // unexported-type-in-api user-facing error message
return &MemoryManagerCheckpoint{
Entries: ContainerMemoryAssignments{},
MachineState: NUMANodeMap{},

View File

@@ -50,7 +50,7 @@ func NewCheckpointState(stateDir, checkpointName, policyName string) (State, err
}
if err := stateCheckpoint.restoreState(); err != nil {
//lint:ignore ST1005 user-facing error message
//nolint:staticcheck // ST1005 user-facing error message
return nil, fmt.Errorf("could not restore state from checkpoint: %v, please drain this node and delete the memory manager checkpoint file %q before restarting Kubelet",
err, path.Join(stateDir, checkpointName))
}

View File

@@ -68,9 +68,8 @@ type criStatsProvider struct {
imageService internalapi.ImageManagerService
// hostStatsProvider is used to get the status of the host filesystem consumed by pods.
hostStatsProvider HostStatsProvider
//lint:ignore U1000 We can't import hcsshim due to Build constraints in hcsshim
// windowsNetworkStatsProvider is used by kubelet to gather networking stats on Windows
windowsNetworkStatsProvider interface{}
windowsNetworkStatsProvider interface{} //nolint:unused // U1000 We can't import hcsshim due to Build constraints in hcsshim
// clock is used report current time
clock clock.Clock