mirror of
https://github.com/securego/gosec.git
synced 2025-11-23 22:15:04 +02:00
Add the rule ID to issues (#188)
This commit is contained in:
committed by
Grant Murphy
parent
a0367559a7
commit
2115402409
@@ -32,7 +32,7 @@ func (r *usingUnsafe) ID() string {
|
||||
|
||||
func (r *usingUnsafe) Match(n ast.Node, c *gas.Context) (gi *gas.Issue, err error) {
|
||||
if _, matches := gas.MatchCallByPackage(n, c, r.pkg, r.calls...); matches {
|
||||
return gas.NewIssue(c, n, r.What, r.Severity, r.Confidence), nil
|
||||
return gas.NewIssue(c, n, r.ID(), r.What, r.Severity, r.Confidence), nil
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user