rules

package
v1.2.8-sp5 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorStrInvalidParamName

func ErrorStrInvalidParamName(name string) string

func ErrorStrNotCallCliCheck

func ErrorStrNotCallCliCheck() string

func ErrorStrSameParamName

func ErrorStrSameParamName(name string, line int) string

func RiskInfoToInformation

func RiskInfoToInformation(r *RiskInfo) *plugin_type_analyzer.YaklangInfoKV

func RuleCliCheck

func RuleCliCheck(prog *ssaapi.Program)

检查是否在最后面调用了 cli.check

func RuleCliDefault

func RuleCliDefault(prog *ssaapi.Program)

检查 cli.setDefault 设置的默认值是否符合规范

func RuleCliParamName

func RuleCliParamName(prog *ssaapi.Program)

检查参数名是否重复和参数名是否符合规范

func YakGetTypeSSAOpt

func YakGetTypeSSAOpt() []ssaapi.Option

Types

type Builder

type Builder struct{}

for method Builder

func (*Builder) Build

func (b *Builder) Build(t ssa.Type, s string) *ssa.FunctionType

func (*Builder) GetMethodNames

func (b *Builder) GetMethodNames(t ssa.Type) []string

type CliParameter

type CliParameter struct {
	Name     string
	Type     string
	Help     string
	Required bool
	Default  any
}

func ParseCliParameter

func ParseCliParameter(prog *ssaapi.Program) []*CliParameter

type RiskInfo

type RiskInfo struct {
	Level             string
	CVE               string
	Type, TypeVerbose string
}

func ParseRiskInfo

func ParseRiskInfo(prog *ssaapi.Program) []*RiskInfo

Jump to

Keyboard shortcuts

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