Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Oneof = &analysis.Analyzer{ Name: "oneoflint", Doc: "Ensures type switches exhaustively handle all variants of protobuf oneof fields. Missing cases in type switches could lead to incomplete handling of possible values, which may cause runtime errors. Supports public variant of the interface too.", Run: newAnalyzer("is", "Is").run, FactTypes: []analysis.Fact{ new(InterfaceImplementorsFact), }, }
View Source
var Sum = &analysis.Analyzer{ Name: "sumlint", Doc: "Ensures type switches handle all variants of interfaces that act as sum types, preventing missed cases.", Run: newAnalyzer("Sum").run, FactTypes: []analysis.Fact{ new(InterfaceImplementorsFact), }, }
Functions ¶
This section is empty.
Types ¶
type InterfaceImplementorsFact ¶
type InterfaceImplementorsFact struct {
Implementors []string // fully qualified (pkgpath.TypeName)
}
InterfaceImplementorsFact stores (packagePath.InterfaceName) -> implementor type names (qualified)
func (*InterfaceImplementorsFact) AFact ¶
func (f *InterfaceImplementorsFact) AFact()
func (*InterfaceImplementorsFact) String ¶
func (f *InterfaceImplementorsFact) String() string
Provide stable, concise string form for analysistest fact matching.
Click to show internal directories.
Click to hide internal directories.