praetorian-inc / gokart

A static analysis tool for securing Go code
Apache License 2.0
2.18k stars 110 forks source link

Declare result types for analyzers. #77

Open hxtk opened 2 years ago

hxtk commented 2 years ago

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.

Resolves #76.