Documentation ¶
Overview ¶
Package trustedfunc implements a trusted function framework where it hooks into different parts of NilAway to provide additional context for certain function calls. This is useful for well-known standard or 3rd party libraries where we can encode certain knowledge about them ( e.g., `assert.Nil(t, x)` implies `x == nil`) and use that to provide better analysis.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func As ¶
As checks a function call AST node to see if it is one of the trusted functions, and if it is then runs the corresponding action and returns that as the output along with a bool indicating success or failure. For example, a binary expression `x != nil` is returned for trusted function `assert.NotNil(t, x)`, while a `TrustedFuncNonnil` producer is returned for `errors.New(s)`
Types ¶
This section is empty.