Skip to content

Commit 8294164

Browse files
authored
feat(ci): update helm and go version in ci workflow (#675)
* feat(ci): update helm and go version in ci workflow Signed-off-by: yxxhero <[email protected]> * refactor: use _ to discard fmt.Fprintf return value Signed-off-by: yxxhero <[email protected]> * fix more lint issue Signed-off-by: yxxhero <[email protected]> * fix more lint issue Signed-off-by: yxxhero <[email protected]> --------- Signed-off-by: yxxhero <[email protected]>
1 parent fe9c4da commit 8294164

File tree

7 files changed

+27
-28
lines changed

7 files changed

+27
-28
lines changed

.github/workflows/ci.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
os: [ubuntu-latest, macos-latest, windows-latest]
4444
shell: [ default ]
4545
experimental: [ false ]
46-
helm-version: [ v3.15.4, v3.16.1 ]
46+
helm-version: [ v3.15.4, v3.16.2 ]
4747
include:
4848
- os: windows-latest
4949
shell: wsl
@@ -61,16 +61,16 @@ jobs:
6161
- os: windows-latest
6262
shell: wsl
6363
experimental: false
64-
helm-version: v3.16.1
64+
helm-version: v3.16.2
6565
- os: windows-latest
6666
shell: cygwin
6767
experimental: false
68-
helm-version: v3.16.1
68+
helm-version: v3.16.2
6969
- os: ubuntu-latest
7070
container: alpine
7171
shell: sh
7272
experimental: false
73-
helm-version: v3.16.1
73+
helm-version: v3.16.2
7474

7575
steps:
7676
- name: Disable autocrlf
@@ -111,7 +111,7 @@ jobs:
111111
# That's why we cover only 2 Helm minor versions in this matrix.
112112
# See https://github.com/helmfile/helmfile/pull/286#issuecomment-1250161182 for more context.
113113
- helm-version: v3.15.4
114-
- helm-version: v3.16.1
114+
- helm-version: v3.16.2
115115
steps:
116116
- uses: engineerd/[email protected]
117117
with:

.github/workflows/lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ jobs:
2121
go-version-file: 'go.mod'
2222
- uses: golangci/golangci-lint-action@v6
2323
with:
24-
version: v1.56.0
24+
version: v1.61.0

.golangci.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ run:
5151

5252
# output configuration options
5353
output:
54+
formats:
5455
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
55-
format: line-number
56+
- format: line-number
5657

5758
# print lines of code with issue, default is true
5859
print-issued-lines: true
@@ -290,7 +291,7 @@ linters:
290291
- depguard
291292
- errcheck
292293
- errorlint
293-
- exportloopref
294+
- copyloopvar
294295
- funlen
295296
- gci
296297
- gocognit

diff/diff.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ func printDiffRecords(suppressedKinds []string, kind string, context int, diffs
332332
for _, ckind := range suppressedKinds {
333333
if ckind == kind {
334334
str := fmt.Sprintf("+ Changes suppressed on sensitive content of type %s\n", kind)
335-
fmt.Fprint(to, ansi.Color(str, "yellow"))
335+
_, _ = fmt.Fprint(to, ansi.Color(str, "yellow"))
336336
return
337337
}
338338
}
@@ -343,7 +343,7 @@ func printDiffRecords(suppressedKinds []string, kind string, context int, diffs
343343
for i, diff := range diffs {
344344
if distances[i] > context {
345345
if !omitting {
346-
fmt.Fprintln(to, "...")
346+
_, _ = fmt.Fprintln(to, "...")
347347
omitting = true
348348
}
349349
} else {
@@ -363,14 +363,14 @@ func printDiffRecord(diff difflib.DiffRecord, to io.Writer) {
363363

364364
switch diff.Delta {
365365
case difflib.RightOnly:
366-
fmt.Fprintf(to, "%s\n", ansi.Color("+ "+text, "green"))
366+
_, _ = fmt.Fprintf(to, "%s\n", ansi.Color("+ "+text, "green"))
367367
case difflib.LeftOnly:
368-
fmt.Fprintf(to, "%s\n", ansi.Color("- "+text, "red"))
368+
_, _ = fmt.Fprintf(to, "%s\n", ansi.Color("- "+text, "red"))
369369
case difflib.Common:
370370
if text == "" {
371-
fmt.Fprintln(to)
371+
_, _ = fmt.Fprintln(to)
372372
} else {
373-
fmt.Fprintf(to, "%s\n", " "+text)
373+
_, _ = fmt.Fprintf(to, "%s\n", " "+text)
374374
}
375375
}
376376
}

diff/report.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func setupDiffReport(r *Report) {
148148
// print report for default output: diff
149149
func printDiffReport(r *Report, to io.Writer) {
150150
for _, entry := range r.entries {
151-
fmt.Fprintf(to, ansi.Color("%s %s", "yellow")+"\n", entry.key, r.format.changestyles[entry.changeType].message)
151+
_, _ = fmt.Fprintf(to, ansi.Color("%s %s", "yellow")+"\n", entry.key, r.format.changestyles[entry.changeType].message)
152152
printDiffRecords(entry.suppressedKinds, entry.kind, entry.context, entry.diffs, to)
153153
}
154154
}
@@ -170,13 +170,13 @@ func printSimpleReport(r *Report, to io.Writer) {
170170
"MODIFY": 0,
171171
}
172172
for _, entry := range r.entries {
173-
fmt.Fprintf(to, ansi.Color("%s %s", r.format.changestyles[entry.changeType].color)+"\n",
173+
_, _ = fmt.Fprintf(to, ansi.Color("%s %s", r.format.changestyles[entry.changeType].color)+"\n",
174174
entry.key,
175175
r.format.changestyles[entry.changeType].message,
176176
)
177177
summary[entry.changeType]++
178178
}
179-
fmt.Fprintf(to, "Plan: %d to add, %d to change, %d to destroy.\n", summary["ADD"], summary["MODIFY"], summary["REMOVE"])
179+
_, _ = fmt.Fprintf(to, "Plan: %d to add, %d to change, %d to destroy.\n", summary["ADD"], summary["MODIFY"], summary["REMOVE"])
180180
}
181181

182182
func newTemplate(name string) *template.Template {

go.mod

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
module github.com/databus23/helm-diff/v3
22

3-
go 1.22.0
4-
5-
toolchain go1.22.4
3+
go 1.23.2
64

75
require (
86
github.com/Masterminds/semver/v3 v3.3.0

main_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func runFakeHelm() int {
7676
var stub *fakeHelmSubcmd
7777

7878
if len(os.Args) < 2 {
79-
fmt.Fprintln(os.Stderr, "fake helm does not support invocations without subcommands")
79+
_, _ = fmt.Fprintln(os.Stderr, "fake helm does not support invocations without subcommands")
8080
return 1
8181
}
8282

@@ -90,7 +90,7 @@ func runFakeHelm() int {
9090
}
9191

9292
if stub == nil {
93-
fmt.Fprintf(os.Stderr, "no stub for %s\n", cmdAndArgs)
93+
_, _ = fmt.Fprintf(os.Stderr, "no stub for %s\n", cmdAndArgs)
9494
return 1
9595
}
9696

@@ -100,13 +100,13 @@ func runFakeHelm() int {
100100
}
101101
got := cmdAndArgs[len(stub.cmd):]
102102
if !reflect.DeepEqual(want, got) {
103-
fmt.Fprintf(os.Stderr, "want: %v\n", want)
104-
fmt.Fprintf(os.Stderr, "got : %v\n", got)
105-
fmt.Fprintf(os.Stderr, "args : %v\n", os.Args)
106-
fmt.Fprintf(os.Stderr, "env : %v\n", os.Environ())
103+
_, _ = fmt.Fprintf(os.Stderr, "want: %v\n", want)
104+
_, _ = fmt.Fprintf(os.Stderr, "got : %v\n", got)
105+
_, _ = fmt.Fprintf(os.Stderr, "args : %v\n", os.Args)
106+
_, _ = fmt.Fprintf(os.Stderr, "env : %v\n", os.Environ())
107107
return 1
108108
}
109-
fmt.Fprintf(os.Stdout, "%s", stub.stdout)
110-
fmt.Fprintf(os.Stderr, "%s", stub.stderr)
109+
_, _ = fmt.Fprintf(os.Stdout, "%s", stub.stdout)
110+
_, _ = fmt.Fprintf(os.Stderr, "%s", stub.stderr)
111111
return stub.exitCode
112112
}

0 commit comments

Comments
 (0)