Documentation ¶
Overview ¶
Package analysishelper provides helper functions for the `go/analysis` package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WrapRun ¶
WrapRun wraps the run function of an analyzer to: (1) convert the return type to Result[T] and put the error in the Result[T].Err field in order to _not_ stop the analysis and let upper-level analyzer to decide what to do. (2) recover from a panic and convert it to an error with stack traces for easier debugging. This is to ensure that NilAway _never_ panics during the analysis. Moreover, it also wraps the error from the sub-analyzer with the name of the analyzer to make it easier to identify the source of the error.
Types ¶
Click to show internal directories.
Click to hide internal directories.