Skip to content

Commit 14ece63

Browse files
committed
fix: linting
1 parent bf3547f commit 14ece63

File tree

8 files changed

+5
-8
lines changed

8 files changed

+5
-8
lines changed

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ linters-settings:
1010
dupl:
1111
threshold: 100
1212
funlen:
13-
lines: 100
13+
lines: -1 # the number of lines (code + empty lines) is not a right metric and leads to code without empty line or one-liner.
1414
statements: 50
1515
goconst:
1616
min-len: 2

pkg/golinters/nolintlint/nolintlint_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import (
1111
"github.com/golangci/golangci-lint/pkg/result"
1212
)
1313

14-
//nolint:funlen
1514
func TestLinter_Run(t *testing.T) {
1615
type issueWithReplacement struct {
1716
issue string

pkg/lint/lintersdb/enabled_set_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"github.com/golangci/golangci-lint/pkg/lint/linter"
1111
)
1212

13-
//nolint:funlen
1413
func TestGetEnabledLintersSet(t *testing.T) {
1514
type cs struct {
1615
cfg config.Linters

pkg/printers/tab_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ path/to/fileb.go:300:9 another issue
7878
desc: "enable all options",
7979
printLinterName: true,
8080
useColors: true,
81-
expected: "\x1b[1mpath/to/filea.go:10\x1b[0m:4 linter-a \x1b[31msome issue\x1b[0m\n\x1b[1mpath/to/fileb.go:300\x1b[0m:9 linter-b \x1b[31manother issue\x1b[0m\n",
81+
//nolint:lll // color characters must be in a simple string.
82+
expected: "\x1b[1mpath/to/filea.go:10\x1b[0m:4 linter-a \x1b[31msome issue\x1b[0m\n\x1b[1mpath/to/fileb.go:300\x1b[0m:9 linter-b \x1b[31manother issue\x1b[0m\n",
8283
},
8384
}
8485

pkg/printers/text_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ func foo() {
9797
printIssuedLine: true,
9898
printLinterName: true,
9999
useColors: true,
100-
expected: "\x1b[1mpath/to/filea.go:10\x1b[0m:4: \x1b[31msome issue\x1b[0m (linter-a)\n\x1b[1mpath/to/fileb.go:300\x1b[0m:9: \x1b[31manother issue\x1b[0m (linter-b)\nfunc foo() {\n\tfmt.Println(\"bar\")\n}\n",
100+
//nolint:lll // color characters must be in a simple string.
101+
expected: "\x1b[1mpath/to/filea.go:10\x1b[0m:4: \x1b[31msome issue\x1b[0m (linter-a)\n\x1b[1mpath/to/fileb.go:300\x1b[0m:9: \x1b[31manother issue\x1b[0m (linter-b)\nfunc foo() {\n\tfmt.Println(\"bar\")\n}\n",
101102
},
102103
{
103104
desc: "disable all options",

test/enabled_linters_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"github.com/golangci/golangci-lint/test/testshared"
1111
)
1212

13-
//nolint:funlen
1413
func TestEnabledLinters(t *testing.T) {
1514
// require to display the message "Active x linters: [x,y]"
1615
t.Setenv(lintersdb.EnvTestRun, "1")

test/testshared/analysis_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"github.com/stretchr/testify/require"
99
)
1010

11-
//nolint:funlen
1211
func Test_parseComments(t *testing.T) {
1312
testCases := []struct {
1413
filename string

test/testshared/runner_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
"github.com/golangci/golangci-lint/pkg/exitcodes"
1010
)
1111

12-
//nolint:funlen
1312
func TestRunnerBuilder_Runner(t *testing.T) {
1413
testCases := []struct {
1514
desc string

0 commit comments

Comments
 (0)