chores(linter): enable gosec linter (#1876)

This commit is contained in:
Aman Mangal
2023-02-17 18:57:39 +05:30
committed by GitHub
parent 14b0d32c59
commit aadabb0ee5
3 changed files with 10 additions and 4 deletions
+8 -2
View File
@@ -8,14 +8,20 @@ linters-settings:
staticcheck:
checks:
- all
- '-SA1019' # it is okay to use math/rand at times
- '-SA1019' # it is okay to use math/rand at times.
gosec:
excludes: # these are not relevant for us right now
- G114
- G204
- G306
- G404
linters:
disable-all: true
enable:
- errcheck
- ineffassign
# - gas
- gosec
- gofmt
- gosimple
- govet
+1 -1
View File
@@ -19,7 +19,7 @@ package main
import (
"fmt"
"net/http"
_ "net/http/pprof"
_ "net/http/pprof" //nolint:gosec
"runtime"
"github.com/dustin/go-humanize"
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"log"
"math/rand"
"net/http"
_ "net/http/pprof"
_ "net/http/pprof" //nolint:gosec
"os"
"sync"
"sync/atomic"