Skip to content

Commit 6d28bcb

Browse files
authored
task: Update golangci-lint to 1.46.2 (#18)
1 parent 6a37409 commit 6d28bcb

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

.github/workflows/pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: lint
2020
uses: golangci/[email protected]
2121
with:
22-
version: v1.41.1
22+
version: v1.46.2
2323

2424
tests-on-unix:
2525
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# A Self-Documenting Makefile: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
22

33
SOURCE_FILES?=./...
4-
GOLANGCI_VERSION=v1.41.1
4+
GOLANGCI_VERSION=v1.46.2
55
COVERAGE=coverage.out
66

77
export PATH := ./bin:$(PATH)

cobra2snooty_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ func TestGenDocsNoHiddenParents(t *testing.T) {
133133
for _, name := range []string{"rootflag", "strtwo"} {
134134
f := Root().PersistentFlags().Lookup(name)
135135
f.Hidden = true
136-
defer func() { f.Hidden = false }()
136+
t.Cleanup(func() { f.Hidden = false })
137137
}
138138
buf := new(bytes.Buffer)
139139
if err := GenDocs(Echo(), buf); err != nil {

flags.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func FlagUsages(f *pflag.FlagSet) string {
5959
if flag.NoOptDefVal != "" {
6060
switch flag.Value.Type() {
6161
case stringType:
62-
line += fmt.Sprintf("[=\"%s\"]", flag.NoOptDefVal)
62+
line += fmt.Sprintf("[=%q]", flag.NoOptDefVal)
6363
case boolType:
6464
if flag.NoOptDefVal != "true" {
6565
line += fmt.Sprintf("[=%s]", flag.NoOptDefVal)

0 commit comments

Comments
 (0)