Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump golangci-lint to v1.42.0 from v1.30.0. #4206

Merged
merged 1 commit into from
Sep 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ TESTPKGS = $(shell env GO111MODULE=on $(GO) list -f \
$(PKGS))
BIN = $(CURDIR)/.bin

GOLANGCI_VERSION = v1.30.0
GOLANGCI_VERSION = v1.42.0
GOSEC_VERSION = v2.4.0

GO = go
Expand Down
3 changes: 1 addition & 2 deletions pkg/apis/pipeline/v1beta1/version_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,5 @@ func ValidateEnabledAPIFields(ctx context.Context, featureName, wantVersion stri
message := fmt.Sprintf(`%s requires "enable-api-fields" feature gate to be %q but it is %q`, featureName, wantVersion, currentVersion)
return errs.Also(apis.ErrGeneric(message))
}
var errs *apis.FieldError = nil
return errs
return nil
}
2 changes: 1 addition & 1 deletion pkg/apis/pipeline/v1beta1/workspace_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (

// allVolumeSourceFields is a list of all the volume source field paths that a
// WorkspaceBinding may include.
var allVolumeSourceFields []string = []string{
var allVolumeSourceFields = []string{
"persistentvolumeclaim",
"volumeclaimtemplate",
"emptydir",
Expand Down
6 changes: 3 additions & 3 deletions pkg/pod/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ func (b *Builder) Build(ctx context.Context, taskRun *v1beta1.TaskRun, taskSpec
// themselves their value takes precedence.
if len(implicitEnvVars) > 0 {
for i, s := range stepContainers {
env := append(implicitEnvVars, s.Env...)
env := append(implicitEnvVars, s.Env...) //nolint
stepContainers[i].Env = env
}
}
Expand All @@ -198,7 +198,7 @@ func (b *Builder) Build(ctx context.Context, taskRun *v1beta1.TaskRun, taskSpec
if taskRun.Annotations[ExecutionModeAnnotation] == ExecutionModeHermetic && alphaAPIEnabled {
for i, s := range stepContainers {
// Add it at the end so it overrides
env := append(s.Env, corev1.EnvVar{Name: TektonHermeticEnvVar, Value: "1"})
env := append(s.Env, corev1.EnvVar{Name: TektonHermeticEnvVar, Value: "1"}) //nolint
stepContainers[i].Env = env
}
}
Expand Down Expand Up @@ -227,7 +227,7 @@ func (b *Builder) Build(ctx context.Context, taskRun *v1beta1.TaskRun, taskSpec
toAdd = append(toAdd, imp)
}
}
vms := append(s.VolumeMounts, toAdd...)
vms := append(s.VolumeMounts, toAdd...) //nolint
stepContainers[i].VolumeMounts = vms
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/pod/pod_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1604,7 +1604,7 @@ _EOF_

overrideHomeEnv := false
if s, ok := c.featureFlags[featureFlagDisableHomeEnvKey]; ok {
var err error = nil
var err error
if overrideHomeEnv, err = strconv.ParseBool(s); err != nil {
t.Fatalf("error parsing bool from %s feature flag: %v", featureFlagDisableHomeEnvKey, err)
}
Expand Down Expand Up @@ -1762,7 +1762,7 @@ func TestPodBuildwithAlphaAPIEnabled(t *testing.T) {

overrideHomeEnv := false
if s, ok := c.featureFlags[featureFlagDisableHomeEnvKey]; ok {
var err error = nil
var err error
if overrideHomeEnv, err = strconv.ParseBool(s); err != nil {
t.Fatalf("error parsing bool from %s feature flag: %v", featureFlagDisableHomeEnvKey, err)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciler/pipelinerun/pipelinerun_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ func TestReconcile_InvalidPipelineRuns(t *testing.T) {
prt := newPipelineRunTest(d, t)
defer prt.Cancel()

wantEvents := append(tc.wantEvents, "Warning InternalError 1 error occurred")
wantEvents := append(tc.wantEvents, "Warning InternalError 1 error occurred") //nolint
reconciledRun, _ := prt.reconcileRun("foo", tc.pipelineRun.Name, wantEvents, tc.permanentError)

if reconciledRun.Status.CompletionTime == nil {
Expand Down