Documentation
¶
Index ¶
- Variables
- type Result
- func (res *Result) AnalyzeOriginalFunctions(pass *analysis.Pass)
- func (res *Result) FindFunctionsWithErrors(pass *analysis.Pass)
- func (res *Result) MarkTaintedFunctions()
- func (res *Result) TryAddCallExpr(info *model.Info, cfgs *ctrlflow.CFGs, call ast.Node) *model.Function
- func (res *Result) TryAddFunction(info *model.Info, cfgs *ctrlflow.CFGs, fun any) *model.Function
- type StackCall
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Result ¶
type Result struct { OriginalFunctions []*model.Function FunctionsWithErrors map[token.Position]*model.Function // contains filtered or unexported fields }
func (*Result) AnalyzeOriginalFunctions ¶
AnalyzeOriginalFunctions walks over originally found functions CFG and reports if unnecessary wrapping is used.
func (*Result) FindFunctionsWithErrors ¶
FindFunctionsWithErrors finds all functions that returns errors in the AST.
func (*Result) MarkTaintedFunctions ¶
func (res *Result) MarkTaintedFunctions()
MarkTaintedFunctions marks functions that return wrapped errors.
func (*Result) TryAddCallExpr ¶
func (res *Result) TryAddCallExpr(info *model.Info, cfgs *ctrlflow.CFGs, call ast.Node) *model.Function
TryAddCallExpr tries to parse AST node as a function call and add its decl to the list of functions with errors. Returns the position of the function declaration if it was added successfully, nil otherwise.
func (*Result) TryAddFunction ¶
TryAddFunction tries to parse AST node as a function and add it to the list of functions with errors. Returns the position of the function declaration if it was added successfully, nil otherwise. If function is already in the list, returns existing position.