1
0
mirror of https://github.com/securego/gosec.git synced 2025-11-27 22:28:20 +02:00

Address go vet failure in SQL rule

This commit is contained in:
Grant Murphy
2016-11-02 17:12:23 -07:00
parent 344ebd1ab6
commit 686927c894

View File

@@ -30,10 +30,12 @@ type SqlStrConcat struct {
SqlStatement SqlStatement
} }
// see if we can figgure out what it is // see if we can figure out what it is
func (s *SqlStrConcat) checkObject(n *ast.Ident) bool { func (s *SqlStrConcat) checkObject(n *ast.Ident) bool {
if n.Obj != nil { if n.Obj != nil {
return (n.Obj.Kind != ast.Var || n.Obj.Kind != ast.Fun) // TODO(gm): Revisit logic used here.
//return (n.Obj.Kind != ast.Var || n.Obj.Kind != ast.Fun)
return n.Obj.Kind != ast.Var && n.Obj.Kind != ast.Fun
} }
return false return false
} }