1
1
Fork 0
mirror of https://github.com/OJ/gobuster.git synced 2024-05-12 00:26:04 +02:00

more linting

This commit is contained in:
firefart 2021-01-05 00:08:05 +01:00
parent 02fc16d4b6
commit 8a31cc47e3
4 changed files with 9 additions and 3 deletions

View File

@ -14,6 +14,9 @@ linters:
- goerr113
- gofumpt
- exhaustivestruct
- forbidigo
- nlreturn
- wrapcheck
issues:
exclude-rules:
@ -25,6 +28,10 @@ issues:
linters:
- gocritic
- text: exitAfterDefer
linters:
- gocritic
- path: cli\\cmd\\.+\.go
linters:
- gochecknoinits

View File

@ -9,7 +9,6 @@ import (
"os/signal"
"github.com/OJ/gobuster/v3/libgobuster"
"github.com/spf13/cobra"
)

View File

@ -9,7 +9,6 @@ import (
func TestParseExtensions(t *testing.T) {
t.Parallel()
var tt = []struct {
testName string
extensions string
@ -41,7 +40,6 @@ func TestParseExtensions(t *testing.T) {
func TestParseCommaSeparatedInt(t *testing.T) {
t.Parallel()
var tt = []struct {
testName string
stringCodes string

View File

@ -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 {