mirror of
https://github.com/safedep/vet.git
synced 2025-12-10 13:43:01 -06:00
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>
29 lines
720 B
Go
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,
|
|
}
|
|
}
|