lint

package
v0.0.0-...-77f2e98 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2025 License: MIT Imports: 10 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL