Skip to content

Commit 84c09e6

Browse files
dependabot[bot]ldez
authored andcommitted
build(deps): bump github.com/securego/gosec/v2 from 2.9.3 to 2.9.5 (golangci#2413)
Co-authored-by: Fernandez Ludovic <[email protected]>
1 parent 1c67b3a commit 84c09e6

File tree

6 files changed

+10
-13
lines changed

6 files changed

+10
-13
lines changed

.golangci.yml

-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ linters:
7171
- dupl
7272
- errcheck
7373
- exportloopref
74-
- exhaustive
7574
- funlen
7675
- gochecknoinits
7776
- goconst
@@ -90,7 +89,6 @@ linters:
9089
- nakedret
9190
- noctx
9291
- nolintlint
93-
- rowserrcheck
9492
- staticcheck
9593
- structcheck
9694
- stylecheck

go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ require (
6969
github.com/ryancurrah/gomodguard v1.2.3
7070
github.com/ryanrolds/sqlclosecheck v0.3.0
7171
github.com/sanposhiho/wastedassign/v2 v2.0.6
72-
github.com/securego/gosec/v2 v2.9.3
72+
github.com/securego/gosec/v2 v2.9.5
7373
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c
7474
github.com/shirou/gopsutil/v3 v3.21.11
7575
github.com/sirupsen/logrus v1.8.1
@@ -92,7 +92,7 @@ require (
9292
github.com/uudashr/gocognit v1.0.5
9393
github.com/valyala/quicktemplate v1.7.0
9494
github.com/yeya24/promlinter v0.1.0
95-
golang.org/x/tools v0.1.8-0.20211102182255-bb4add04ddef
95+
golang.org/x/tools v0.1.8
9696
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
9797
honnef.co/go/tools v0.2.2
9898
mvdan.cc/gofumpt v0.2.0

go.sum

+5-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/golinters/gocritic.go

-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ func configureCheckerInfo(
121121
// Maybe in the future, this kind of conversion will be done in go-critic itself.
122122
func normalizeCheckerParamsValue(lintCtx *linter.Context, p interface{}) interface{} {
123123
rv := reflect.ValueOf(p)
124-
// nolint:exhaustive // only 3 types (int, bool, and string) are supported by CheckerParam.Value
125124
switch rv.Type().Kind() {
126125
case reflect.Int64, reflect.Int32, reflect.Int16, reflect.Int8, reflect.Int:
127126
return int(rv.Int())

pkg/golinters/gosec.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func NewGosec(settings *config.GoSecSettings) *goanalysis.Linter {
4040
}
4141
}
4242

43-
ruleDefinitions := rules.Generate(filters...)
43+
ruleDefinitions := rules.Generate(false, filters...)
4444

4545
logger := log.New(io.Discard, "", 0)
4646

@@ -55,8 +55,8 @@ func NewGosec(settings *config.GoSecSettings) *goanalysis.Linter {
5555
nil,
5656
).WithContextSetter(func(lintCtx *linter.Context) {
5757
analyzer.Run = func(pass *analysis.Pass) (interface{}, error) {
58-
gosecAnalyzer := gosec.NewAnalyzer(gasConfig, true, settings.ExcludeGenerated, logger)
59-
gosecAnalyzer.LoadRules(ruleDefinitions.Builders())
58+
gosecAnalyzer := gosec.NewAnalyzer(gasConfig, true, settings.ExcludeGenerated, false, logger)
59+
gosecAnalyzer.LoadRules(ruleDefinitions.RulesInfo())
6060

6161
pkg := &packages.Package{
6262
Fset: pass.Fset,

pkg/result/processors/sort_results.go

-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ func (c compareResult) isNeutral() bool {
6363
return c == None || c == Equal
6464
}
6565

66-
//nolint:exhaustive
6766
func (c compareResult) String() string {
6867
switch c {
6968
case Less:

0 commit comments

Comments
 (0)