mirror of
https://github.com/securego/gosec.git
synced 2025-11-25 22:22:17 +02:00
Make G201 ignore CallExpr with no args (#262)
This commit is contained in:
@@ -134,6 +134,11 @@ func (s *sqlStrFormat) Match(n ast.Node, c *gosec.Context) (*gosec.Issue, error)
|
||||
}
|
||||
}
|
||||
|
||||
// no formatter
|
||||
if len(node.Args) == 0 {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
var formatter string
|
||||
|
||||
// concats callexpr arg strings together if needed before regex evaluation
|
||||
|
||||
Reference in New Issue
Block a user