Skip to content

Commit bcf4544

Browse files
committed
fix pre-commit run
1 parent 4b236c7 commit bcf4544

File tree

20 files changed

+22
-23
lines changed

20 files changed

+22
-23
lines changed

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ linters:
102102
# - structcheck
103103
- stylecheck
104104
- tagalign
105-
- tagliatelle
105+
# - tagliatelle
106106
- tenv
107107
- testableexamples
108108
- testpackage

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ repos:
6565
# - id: go-mod-tidy
6666
- id: golangci-lint # requires github.com/golangci/golangci-lint
6767
args:
68-
["--allow-parallel-runners", "--go=1.17", "--config=.golangci.yml"]
68+
["--allow-parallel-runners", "--config=.golangci.yml"]
6969
- repo: https://github.com/renovatebot/pre-commit-hooks
7070
rev: 37.421.0
7171
hooks:

cmd/ccat/memoryUsage_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ func TestPrintMemUsage(t *testing.T) {
99
{name: "donotpanicplease"},
1010
}
1111
for _, tt := range tests {
12-
t.Run(tt.name, func(t *testing.T) {
12+
t.Run(tt.name, func(_ *testing.T) {
1313
PrintMemUsage()
1414
})
1515
}

cmd/ccat/processfile_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func Test_processFile(t *testing.T) {
2828
}
2929

3030
for _, tt := range tests {
31-
t.Run(tt.name, func(t *testing.T) {
31+
t.Run(tt.name, func(_ *testing.T) {
3232
processFile(io.Discard, tt.args.path)
3333
processFileAsIs(io.Discard, tt.args.path)
3434
})
@@ -42,7 +42,7 @@ func Test_setError(t *testing.T) {
4242
{"donotpanicplease"},
4343
}
4444
for _, tt := range tests {
45-
t.Run(tt.name, func(t *testing.T) {
45+
t.Run(tt.name, func(_ *testing.T) {
4646
setErrored()
4747
})
4848
}

cmd/ccat/stdout_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package main
33
import "testing"
44

55
func Test_setupStdout(t *testing.T) {
6-
t.Run("donotpanicplease", func(t *testing.T) {
6+
t.Run("donotpanicplease", func(_ *testing.T) {
77
_ = setupStdout(false)
88
_ = setupStdout(true)
99
})

cmd/ccat/ui_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
)
77

88
func Test_uiWrapProcessFile(t *testing.T) {
9-
t.Run("donotpanicplease", func(t *testing.T) {
9+
t.Run("donotpanicplease", func(_ *testing.T) {
1010
_ = uiWrapProcessFile(func(io.Writer, string) {})
1111
})
1212
}

magefiles/magefile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ var Default = BuildDefaultAndTest
2121
var (
2222
defaultBuildArgs = []string{"build"}
2323
binaryName = "ccat"
24-
goBin = mg.GoCmd()
24+
goBin = mg.GoCmd()
2525
)
2626

2727
func init() {

pkg/color/color256.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func (c C256) Sprint(s string) string {
2424

2525
// #nosec
2626
func (c *C256) Next() Color {
27-
rand.Seed(int64(*c))
28-
n := C256(rand.Intn(230))
27+
rand.Seed(int64(*c)) //nolint:staticcheck
28+
n := C256(rand.Intn(230)) //nolint:gosec
2929
return &n
3030
}

pkg/completion/common_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func TestPrint(t *testing.T) {
1919
{"bash", args{"bash", []string{}}},
2020
}
2121
for _, tt := range tests {
22-
t.Run(tt.name, func(t *testing.T) {
22+
t.Run(tt.name, func(_ *testing.T) {
2323
completion.Print(tt.args.shell, tt.args.opts)
2424
})
2525
}

pkg/globalctx/context_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ var (
2222

2323
func TestSet(t *testing.T) {
2424
for _, tt := range testsGlobalCtx {
25-
t.Run(tt.name, func(t *testing.T) {
25+
t.Run(tt.name, func(_ *testing.T) {
2626
globalctx.Set(tt.k, tt.v)
2727
})
2828
}

0 commit comments

Comments
 (0)