diff --git a/resolve.go b/resolve.go index 9030133..12743c7 100644 --- a/resolve.go +++ b/resolve.go @@ -73,7 +73,7 @@ func resolveCallExpr(n *ast.CallExpr, c *Context) bool { return false } -// TryResolve will attempt, given a subtree starting at some ATS node, to resolve +// TryResolve will attempt, given a subtree starting at some AST node, to resolve // all values contained within to a known constant. It is used to check for any // unknown values in compound expressions. func TryResolve(n ast.Node, c *Context) bool { diff --git a/resolve_test.go b/resolve_test.go index 233f49b..035ba90 100644 --- a/resolve_test.go +++ b/resolve_test.go @@ -91,6 +91,7 @@ var _ = Describe("Resolve ast node to concrete value", func() { Expect(target).ShouldNot(BeNil()) Expect(gosec.TryResolve(target, ctx)).Should(BeTrue()) }) + It("should successfully resolve value spec", func() { var value *ast.ValueSpec pkg := testutils.NewTestPackage() @@ -111,7 +112,6 @@ var _ = Describe("Resolve ast node to concrete value", func() { Expect(value).ShouldNot(BeNil()) Expect(gosec.TryResolve(value, ctx)).Should(BeTrue()) }) - }) })