Skip to content

Commit 328c10d

Browse files
authored
chores(linter): enable gosec linter (#1876)
1 parent 260b920 commit 328c10d

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

.golangci.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,20 @@ linters-settings:
88
staticcheck:
99
checks:
1010
- all
11-
- '-SA1019' # it is okay to use math/rand at times
11+
- '-SA1019' # it is okay to use math/rand at times.
12+
gosec:
13+
excludes: # these are not relevant for us right now
14+
- G114
15+
- G204
16+
- G306
17+
- G404
1218

1319
linters:
1420
disable-all: true
1521
enable:
1622
- errcheck
1723
- ineffassign
18-
# - gas
24+
- gosec
1925
- gofmt
2026
- gosimple
2127
- govet

badger/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package main
1919
import (
2020
"fmt"
2121
"net/http"
22-
_ "net/http/pprof"
22+
_ "net/http/pprof" //nolint:gosec
2323
"runtime"
2424

2525
"github.com/dustin/go-humanize"

integration/testgc/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"log"
77
"math/rand"
88
"net/http"
9-
_ "net/http/pprof"
9+
_ "net/http/pprof" //nolint:gosec
1010
"os"
1111
"sync"
1212
"sync/atomic"

0 commit comments

Comments
 (0)