Skip to content

Commit

Permalink
fix: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Mar 25, 2023
1 parent bf3547f commit e9ad2c1
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ linters-settings:
dupl:
threshold: 100
funlen:
lines: 100
lines: -1 # the number of lines (code + empty lines) is not a right metric and leads to code without empty line or one-liner.
statements: 50
goconst:
min-len: 2
Expand Down
1 change: 0 additions & 1 deletion pkg/golinters/nolintlint/nolintlint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"github.com/golangci/golangci-lint/pkg/result"
)

//nolint:funlen
func TestLinter_Run(t *testing.T) {
type issueWithReplacement struct {
issue string
Expand Down
3 changes: 2 additions & 1 deletion pkg/printers/tab_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ path/to/fileb.go:300:9 another issue
desc: "enable all options",
printLinterName: true,
useColors: true,
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",
//nolint:lll // color characters must be in a simple string.
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",
},
}

Expand Down
3 changes: 2 additions & 1 deletion pkg/printers/text_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ func foo() {
printIssuedLine: true,
printLinterName: true,
useColors: true,
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",
//nolint:lll // color characters must be in a simple string.
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",
},
{
desc: "disable all options",
Expand Down
1 change: 0 additions & 1 deletion test/testshared/analysis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"github.com/stretchr/testify/require"
)

//nolint:funlen
func Test_parseComments(t *testing.T) {
testCases := []struct {
filename string
Expand Down
1 change: 0 additions & 1 deletion test/testshared/runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"github.com/golangci/golangci-lint/pkg/exitcodes"
)

//nolint:funlen
func TestRunnerBuilder_Runner(t *testing.T) {
testCases := []struct {
desc string
Expand Down

0 comments on commit e9ad2c1

Please sign in to comment.