mirror of
https://github.com/OJ/gobuster.git
synced 2024-05-12 00:26:04 +02:00
more linting
This commit is contained in:
parent
02fc16d4b6
commit
8a31cc47e3
|
@ -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
|
||||
|
|
|
@ -9,7 +9,6 @@ import (
|
|||
"os/signal"
|
||||
|
||||
"github.com/OJ/gobuster/v3/libgobuster"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue