Skip to content

Commit

Permalink
more linting
Browse files Browse the repository at this point in the history
  • Loading branch information
firefart committed Jan 4, 2021
1 parent 02fc16d commit 8a31cc4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ linters:
- goerr113
- gofumpt
- exhaustivestruct
- forbidigo
- nlreturn
- wrapcheck

issues:
exclude-rules:
Expand All @@ -25,6 +28,10 @@ issues:
linters:
- gocritic

- text: exitAfterDefer
linters:
- gocritic

- path: cli\\cmd\\.+\.go
linters:
- gochecknoinits
Expand Down
1 change: 0 additions & 1 deletion cli/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"os/signal"

"github.com/OJ/gobuster/v3/libgobuster"

"github.com/spf13/cobra"
)

Expand Down
2 changes: 0 additions & 2 deletions helper/helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (

func TestParseExtensions(t *testing.T) {
t.Parallel()

var tt = []struct {
testName string
extensions string
Expand Down Expand Up @@ -41,7 +40,6 @@ func TestParseExtensions(t *testing.T) {

func TestParseCommaSeparatedInt(t *testing.T) {
t.Parallel()

var tt = []struct {
testName string
stringCodes string
Expand Down
2 changes: 2 additions & 0 deletions libgobuster/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ func TestLineCounter(t *testing.T) {
{"Empty", "", 1},
}
for _, x := range tt {
x := x // NOTE: https://github.com/golang/go/wiki/CommonMistakes#using-goroutines-on-loop-iterator-variables
t.Run(x.testName, func(t *testing.T) {
t.Parallel()
r := strings.NewReader(x.s)
l, err := lineCounter(r)
if err != nil {
Expand Down

0 comments on commit 8a31cc4

Please sign in to comment.