Skip to main content

ssa

实例名实例描述
Java(consts.Language) "java"
Javascript(consts.Language) "js"
PHP(consts.Language) "php"
Yak(consts.Language) "yak"
progName(schema.SSADiffResultKind) "program"
runtimeId(schema.SSADiffResultKind) "runtimeId"
函数名函数描述/介绍
ssa.NewFromProgramName
ssa.NewProgramFromDB
ssa.NewResultFromDB
ssa.Parse
ssa.ParseLocalProject
ssa.ParseProject
ssa.YaklangScriptChecking
ssa.withConcurrency
ssa.withConfigInfo
ssa.withContext
ssa.withDefaultExcludeFunc
ssa.withDescription
ssa.withEntryFile
ssa.withExcludeFile
ssa.withExternLib
ssa.withExternValue
ssa.withLanguage
ssa.withMemory
ssa.withPeepholeSize
ssa.withProcess
ssa.withProgramNamesave to database, please set the program name
ssa.withProjectName
ssa.withReCompile
ssa.withStrictMode

函数定义#

NewFromProgramName#

详细描述#

定义#

NewFromProgramName(programName string) (p *Program, err error)

参数#

参数名参数类型参数解释
programNamestring

返回值#

返回值(顺序)返回值类型返回值解释
p*Program
errerror

NewProgramFromDB#

详细描述#

定义#

NewProgramFromDB(programName string) (p *Program, err error)

参数#

参数名参数类型参数解释
programNamestring

返回值#

返回值(顺序)返回值类型返回值解释
p*Program
errerror

NewResultFromDB#

详细描述#

定义#

NewResultFromDB(resultID uint, force ...bool) (*SyntaxFlowResult, error)

参数#

参数名参数类型参数解释
resultIDuint
force...bool

返回值#

返回值(顺序)返回值类型返回值解释
r1*SyntaxFlowResult
r2error

Parse#

详细描述#

定义#

Parse(code string, opts ...Option) (*Program, error)

参数#

参数名参数类型参数解释
codestring
opts...Option

返回值#

返回值(顺序)返回值类型返回值解释
r1*Program
r2error

ParseLocalProject#

详细描述#

定义#

ParseLocalProject(path string, opts ...Option) (Programs, error)

参数#

参数名参数类型参数解释
pathstring
opts...Option

返回值#

返回值(顺序)返回值类型返回值解释
r1Programs
r2error

ParseProject#

详细描述#

定义#

ParseProject(opts ...Option) (prog Programs, err error)

参数#

参数名参数类型参数解释
opts...Option

返回值#

返回值(顺序)返回值类型返回值解释
progPrograms
errerror

YaklangScriptChecking#

详细描述#

定义#

YaklangScriptChecking(code string, pluginType string) []*result.StaticAnalyzeResult

参数#

参数名参数类型参数解释
codestring
pluginTypestring

返回值#

返回值(顺序)返回值类型返回值解释
r1[]*result.StaticAnalyzeResult

withConcurrency#

详细描述#

定义#

withConcurrency(concurrency int) Option

参数#

参数名参数类型参数解释
concurrencyint

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withConfigInfo#

详细描述#

定义#

withConfigInfo(input map[string]any) Option

参数#

参数名参数类型参数解释
inputmap[string]any

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withContext#

详细描述#

定义#

withContext(ctx context.Context) Option

参数#

参数名参数类型参数解释
ctxcontext.Context

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withDefaultExcludeFunc#

详细描述#

定义#

withDefaultExcludeFunc(patterns []string) (Option, error)

参数#

参数名参数类型参数解释
patterns[]string

返回值#

返回值(顺序)返回值类型返回值解释
r1Option
r2error

withDescription#

详细描述#

定义#

withDescription(desc string) Option

参数#

参数名参数类型参数解释
descstring

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withEntryFile#

详细描述#

定义#

withEntryFile(files ...string) Option

参数#

参数名参数类型参数解释
files...string

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withExcludeFile#

详细描述#

定义#

withExcludeFile(f func(path, filename string) bool) Option

参数#

参数名参数类型参数解释
ffunc(path, filename string) bool

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withExternLib#

详细描述#

定义#

withExternLib(name string, table map[string]any) Option

参数#

参数名参数类型参数解释
namestring
tablemap[string]any

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withExternValue#

详细描述#

定义#

withExternValue(table map[string]any) Option

参数#

参数名参数类型参数解释
tablemap[string]any

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withLanguage#

详细描述#

定义#

withLanguage(input_language string) Option

参数#

参数名参数类型参数解释
input_languagestring

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withMemory#

详细描述#

定义#

withMemory(ttl ...time.Duration) Option

参数#

参数名参数类型参数解释
ttl...time.Duration

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withPeepholeSize#

详细描述#

定义#

withPeepholeSize(size int) Option

参数#

参数名参数类型参数解释
sizeint

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withProcess#

详细描述#

定义#

withProcess(process ProcessFunc) Option

参数#

参数名参数类型参数解释
processProcessFunc

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withProgramName#

详细描述#

save to database, please set the program name

定义#

withProgramName(name string) Option

参数#

参数名参数类型参数解释
namestring

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withProjectName#

详细描述#

定义#

withProjectName(name string) Option

参数#

参数名参数类型参数解释
namestring

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withReCompile#

详细描述#

定义#

withReCompile(b bool) Option

参数#

参数名参数类型参数解释
bbool

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withStrictMode#

详细描述#

定义#

withStrictMode(b bool) Option

参数#

参数名参数类型参数解释
bbool

返回值#

返回值(顺序)返回值类型返回值解释
r1Option