callcheck

package
v0.0.0-...-b9adcda Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package callcheck provides a framework for validating arguments in function calls.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Analyzer

func Analyzer(rules map[string]Check) func(pass *analysis.Pass) (interface{}, error)

func ExtractConst

func ExtractConst(v Value) *ir.Const

func ExtractConstExpectKind

func ExtractConstExpectKind(v Value, kind constant.Kind) *ir.Const

Types

type Argument

type Argument struct {
	Value Value
	// contains filtered or unexported fields
}

func (*Argument) Invalid

func (arg *Argument) Invalid(msg string)

type Call

type Call struct {
	Pass  *analysis.Pass
	Instr ir.CallInstruction
	Args  []*Argument

	Parent *ir.Function
	// contains filtered or unexported fields
}

func (*Call) Invalid

func (c *Call) Invalid(msg string)

type Check

type Check func(call *Call)

type Value

type Value struct {
	Value ir.Value
}

Jump to

Keyboard shortcuts

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