Skip to content

Commit d6aeaad

Browse files
authored
correct gci linter (#946)
Signed-off-by: Matthieu MOREL <[email protected]>
1 parent 73f0efc commit d6aeaad

23 files changed

+62
-33
lines changed

.golangci.yml

Lines changed: 35 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,40 @@
11
linters:
22
enable:
3-
- asciicheck
4-
- bodyclose
5-
- depguard
6-
- dogsled
7-
- durationcheck
8-
- errcheck
9-
- errorlint
10-
- exportloopref
11-
- gci
12-
- gofmt
13-
- gofumpt
14-
- goimports
15-
- gosec
16-
- gosimple
17-
- govet
18-
- importas
19-
- ineffassign
20-
- megacheck
21-
- misspell
22-
- nakedret
23-
- nolintlint
24-
- revive
25-
- staticcheck
26-
- typecheck
27-
- unconvert
28-
- unparam
29-
- unused
30-
- wastedassign
3+
- asciicheck
4+
- bodyclose
5+
- depguard
6+
- dogsled
7+
- durationcheck
8+
- errcheck
9+
- errorlint
10+
- exportloopref
11+
- gci
12+
- gofmt
13+
- gofumpt
14+
- goimports
15+
- gosec
16+
- gosimple
17+
- govet
18+
- importas
19+
- ineffassign
20+
- megacheck
21+
- misspell
22+
- nakedret
23+
- nolintlint
24+
- revive
25+
- staticcheck
26+
- typecheck
27+
- unconvert
28+
- unparam
29+
- unused
30+
- wastedassign
31+
32+
linters-settings:
33+
gci:
34+
sections:
35+
- standard
36+
- default
37+
- prefix(github.com/securego)
3138

3239
run:
3340
timeout: 5m

analyzers/ssrf.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@
1515
package analyzers
1616

1717
import (
18-
"github.com/securego/gosec/v2/issue"
1918
"golang.org/x/tools/go/analysis"
2019
"golang.org/x/tools/go/analysis/passes/buildssa"
2120
"golang.org/x/tools/go/ssa"
21+
22+
"github.com/securego/gosec/v2/issue"
2223
)
2324

2425
func newSSRFAnalyzer(id string, description string) *analysis.Analyzer {

analyzers/util.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ import (
2121
"os"
2222
"strconv"
2323

24-
"github.com/securego/gosec/v2/issue"
2524
"golang.org/x/tools/go/analysis"
2625
"golang.org/x/tools/go/analysis/passes/buildssa"
26+
27+
"github.com/securego/gosec/v2/issue"
2728
)
2829

2930
// SSAAnalyzerResult contains various information returned by the

call_list_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55

66
. "github.com/onsi/ginkgo/v2"
77
. "github.com/onsi/gomega"
8+
89
"github.com/securego/gosec/v2"
910
"github.com/securego/gosec/v2/testutils"
1011
)

cmd/gosec/sort_issues_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55

66
. "github.com/onsi/ginkgo/v2"
77
. "github.com/onsi/gomega"
8+
89
"github.com/securego/gosec/v2/issue"
910
)
1011

config_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66

77
. "github.com/onsi/ginkgo/v2"
88
. "github.com/onsi/gomega"
9+
910
"github.com/securego/gosec/v2"
1011
)
1112

cwe/data_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package cwe_test
33
import (
44
. "github.com/onsi/ginkgo/v2"
55
. "github.com/onsi/gomega"
6+
67
"github.com/securego/gosec/v2/cwe"
78
)
89

cwe/types_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package cwe_test
33
import (
44
. "github.com/onsi/ginkgo/v2"
55
. "github.com/onsi/gomega"
6+
67
"github.com/securego/gosec/v2/cwe"
78
)
89

flag_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66

77
. "github.com/onsi/ginkgo/v2"
88
. "github.com/onsi/gomega"
9+
910
"github.com/securego/gosec/v2/cmd/vflag"
1011
)
1112

helpers_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88

99
. "github.com/onsi/ginkgo/v2"
1010
. "github.com/onsi/gomega"
11+
1112
"github.com/securego/gosec/v2"
1213
"github.com/securego/gosec/v2/testutils"
1314
)

0 commit comments

Comments
 (0)