You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.
typeAnalyzerstruct {
// ...// Run applies the analyzer to a package.// It returns an error if the analyzer failed.//// On success, the Run function may return a result// computed by the Analyzer; its type must match ResultType.// The driver makes this result available as an input to// another Analyzer that depends directly on this one (see// Requires) when it analyzes the same package.//// To pass analysis results between packages (and thus// potentially between address spaces), use Facts, which are// serializable.Runfunc(*[Pass](https://pkg.go.dev/golang.org/x/tools/go/analysis#Pass)) (interface{}, [error](https://pkg.go.dev/builtin#error))// ...// ResultType is the type of the optional result of the Run function.ResultType [reflect](https://pkg.go.dev/reflect).[Type](https://pkg.go.dev/reflect#Type)// ...
}
Because of this, the analyzers fail to run:
analyzer "command_injection" failed: internal error: on package github.com/jcmturner/gokrb5/v8/iana, analyzer command_injection returned a result of type []util.Finding, but declared ResultType <nil>
The text was updated successfully, but these errors were encountered:
hxtk
added a commit
to hxtk/gokart
that referenced
this issue
Jul 30, 2022
This change declares each of the analyzers in the analyzers
package to have a result type of
`[]github.com/praetorian-inc/gokart/util.Finding`.
A test has also been included that runs a minimal `*analysis.Pass`
through each analyzer's `Run` function, reflectively determines the
type of the result value, and compares it to the declared result type
of the analyzer.
Resolvespraetorian-inc#76.
hxtk
linked a pull request
Jul 30, 2022
that will
close
this issue
According to https://pkg.go.dev/golang.org/x/tools/go/analysis#Analyzer:
Because of this, the analyzers fail to run:
The text was updated successfully, but these errors were encountered: