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 to golangci-lint v1.60.1 #2379

Merged
merged 1 commit into from
Aug 21, 2024
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 @@ -11,7 +11,7 @@ M = $(shell printf "\033[34;1m🐱\033[0m")
TIMEOUT_UNIT = 5m
TIMEOUT_E2E = 20m

GOLANGCI_VERSION = v1.58.0
GOLANGCI_VERSION = v1.60.1

YAML_FILES := $(shell find . -type f -regex ".*y[a]ml" -print)

Expand Down
4 changes: 2 additions & 2 deletions pkg/formatted/color.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func DecorateAttr(attrString, message string) string {
case "underline":
attr = color.Underline
case "underline bold":
return color.New(color.Underline).Add(color.Bold).Sprintf(message)
return color.New(color.Underline).Add(color.Bold).Sprintf("%s", message)
case "bold":
attr = color.Bold
case "yellow":
Expand All @@ -104,7 +104,7 @@ func DecorateAttr(attrString, message string) string {
attr = color.FgHiWhite
}

return color.New(attr).Sprintf(message)
return color.New(attr).Sprintf("%s", message)
}

type atomicCounter struct {
Expand Down
4 changes: 2 additions & 2 deletions pkg/log/pipeline_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (r *Reader) readLivePipelineLogs(pr *v1.PipelineRun) (<-chan Log, <-chan er
wg.Wait()

if !empty(pr.Status) && pr.Status.Conditions[0].Status == corev1.ConditionFalse {
errC <- fmt.Errorf(pr.Status.Conditions[0].Message)
errC <- fmt.Errorf("%s", pr.Status.Conditions[0].Message)
}
}()

Expand Down Expand Up @@ -118,7 +118,7 @@ func (r *Reader) readAvailablePipelineLogs(pr *v1.PipelineRun) (<-chan Log, <-ch
}

if !empty(pr.Status) && pr.Status.Conditions[0].Status == corev1.ConditionFalse {
errC <- fmt.Errorf(pr.Status.Conditions[0].Message)
errC <- fmt.Errorf("%s", pr.Status.Conditions[0].Message)
}
}()

Expand Down
2 changes: 1 addition & 1 deletion pkg/params/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func ValidateParamType(params []v1beta1.ParamSpec) error {
for _, param := range paramsWithInvalidType {
errString += fmt.Sprintf(" '%s'", param.Name)
}
return fmt.Errorf(errString)
return fmt.Errorf("%s", errString)
}

return nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/pods/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func checkPodStatus(obj interface{}) (*corev1.Pod, error) {
for _, c := range pod.Status.Conditions {
if c.Type == corev1.PodInitialized || c.Type == corev1.ContainersReady {
if c.Status == corev1.ConditionUnknown {
return pod, fmt.Errorf(c.Message)
return pod, fmt.Errorf("%s", c.Message)
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions pkg/workspaces/workspaces_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func TestMerge(t *testing.T) {
optWS := []string{}
outWS, err := Merge(ws, optWS, httpClient)
if err != nil {
t.Errorf("Not expected error: " + err.Error())
t.Errorf("Not expected error: %s", err.Error())
}
test.AssertOutput(t, ws, outWS)

Expand Down Expand Up @@ -110,14 +110,14 @@ func TestMerge(t *testing.T) {
}
outWS, err = Merge(ws, optWS, httpClient)
if err != nil {
t.Errorf("Not expected error: " + err.Error())
t.Errorf("Not expected error: %s", err.Error())
}
test.AssertOutput(t, 7, len(outWS))

optWS = []string{"name=volumeclaimtemplatews,volumeClaimTemplateFile=./testdata/pvc.yaml"}
_, err = Merge(ws, optWS, httpClient)
if err != nil {
t.Errorf("Not expected error: " + err.Error())
t.Errorf("Not expected error: %s", err.Error())
}

optWS = []string{"name=volumeclaimtemplatews,volumeClaimTemplateFile=./testdata/pvc-typo.yaml"}
Expand All @@ -130,7 +130,7 @@ func TestMerge(t *testing.T) {
optWS = []string{"name=csiws,csiFile=./testdata/csi.yaml"}
outWS, err = Merge(ws, optWS, httpClient)
if err != nil {
t.Errorf("Not expected error: " + err.Error())
t.Errorf("Not expected error: %s", err.Error())
}

optWS = []string{"name=csiws,csiFile=./testdata/csi-typo.yaml"}
Expand Down
6 changes: 3 additions & 3 deletions tekton/release-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ spec:
- name: flags
value: "-v --timeout 20m"
- name: version
value: v1.58.0
value: v1.60.1
workspaces:
- name: source
workspace: shared-workspace
Expand All @@ -68,7 +68,7 @@ spec:
- name: packages
value: ./pkg/... ./cmd/...
- name: version
value: "1.22"
value: "1.22.5"
- name: flags
value: -v -mod=vendor
workspaces:
Expand All @@ -82,7 +82,7 @@ spec:
- name: package
value: $(params.package)
- name: version
value: "1.22"
value: "1.22.5"
- name: flags
value: -v -mod=vendor
workspaces:
Expand Down
3 changes: 2 additions & 1 deletion tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module github.com/tektoncd/cli/tools

go 1.22.0
go 1.22.1

toolchain go1.22.5

require github.com/golangci/golangci-lint v1.60.1
Expand Down