Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): bump github.com/securego/gosec/v2 from 2.9.3 to 2.9.5 #2413

Merged
merged 5 commits into from Dec 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions .golangci.yml
Expand Up @@ -71,7 +71,6 @@ linters:
- dupl
- errcheck
- exportloopref
- exhaustive
- funlen
- gochecknoinits
- goconst
Expand All @@ -90,7 +89,6 @@ linters:
- nakedret
- noctx
- nolintlint
- rowserrcheck
- staticcheck
- structcheck
- stylecheck
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Expand Up @@ -69,7 +69,7 @@ require (
github.com/ryancurrah/gomodguard v1.2.3
github.com/ryanrolds/sqlclosecheck v0.3.0
github.com/sanposhiho/wastedassign/v2 v2.0.6
github.com/securego/gosec/v2 v2.9.3
github.com/securego/gosec/v2 v2.9.5
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c
github.com/shirou/gopsutil/v3 v3.21.11
github.com/sirupsen/logrus v1.8.1
Expand All @@ -92,7 +92,7 @@ require (
github.com/uudashr/gocognit v1.0.5
github.com/valyala/quicktemplate v1.7.0
github.com/yeya24/promlinter v0.1.0
golang.org/x/tools v0.1.8-0.20211102182255-bb4add04ddef
golang.org/x/tools v0.1.8
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
honnef.co/go/tools v0.2.2
mvdan.cc/gofumpt v0.2.0
Expand Down
9 changes: 5 additions & 4 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pkg/golinters/gocritic.go
Expand Up @@ -121,7 +121,6 @@ func configureCheckerInfo(
// Maybe in the future, this kind of conversion will be done in go-critic itself.
func normalizeCheckerParamsValue(lintCtx *linter.Context, p interface{}) interface{} {
rv := reflect.ValueOf(p)
// nolint:exhaustive // only 3 types (int, bool, and string) are supported by CheckerParam.Value
switch rv.Type().Kind() {
case reflect.Int64, reflect.Int32, reflect.Int16, reflect.Int8, reflect.Int:
return int(rv.Int())
Expand Down
6 changes: 3 additions & 3 deletions pkg/golinters/gosec.go
Expand Up @@ -40,7 +40,7 @@ func NewGosec(settings *config.GoSecSettings) *goanalysis.Linter {
}
}

ruleDefinitions := rules.Generate(filters...)
ruleDefinitions := rules.Generate(false, filters...)

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

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

pkg := &packages.Package{
Fset: pass.Fset,
Expand Down
1 change: 0 additions & 1 deletion pkg/result/processors/sort_results.go
Expand Up @@ -63,7 +63,6 @@ func (c compareResult) isNeutral() bool {
return c == None || c == Equal
}

//nolint:exhaustive
func (c compareResult) String() string {
switch c {
case Less:
Expand Down