vet/pkg/code/entities/function_decl.go
abhisek e6f6288701
feat: Code analysis framework infra
feat: Building code graph

Refactor to support import processing

Handle relative import name fixup

Add docs for code analysis framework

Update docs to include additional examples

feat: Function call graph

Update code graph to link function decl and calls

Include call node in function calls

feat: Flatten vulnerabilities in CSV reporter

refactor: Maintain separation of concerns for code analysis framework

refactor: Separate storage entities in its own package

feat: Add callback support in code graph builder

docs: Fix code analysis framework docs
Signed-off-by: abhisek <abhisek.datta@gmail.com>
2024-07-11 15:09:11 +05:30

29 lines
720 B
Go

package entities
const (
FunctionDeclEntity = "function_decl"
FunctionDeclPropertyName = "name"
FunctionDeclPropertyContainerName = "containerName"
FunctionDeclPropertySourceFilePath = "sourceFilePath"
FunctionDeclPropertySourceFileType = "sourceFileType"
)
type FunctionDecl struct {
Id string
ContainerName string
FunctionName string
SourceFilePath string
SourceFileType string
}
func (f *FunctionDecl) Properties() map[string]string {
return map[string]string{
FunctionDeclPropertyName: f.FunctionName,
FunctionDeclPropertyContainerName: f.ContainerName,
FunctionDeclPropertySourceFilePath: f.SourceFilePath,
FunctionDeclPropertySourceFileType: f.SourceFileType,
}
}