Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseReferenceInclude ¶
Types ¶
type DockerInstruction ¶
func ParseDockerfile ¶
func ParseDockerfile(reader io.Reader) ([]DockerInstruction, error)
type DockerProcessor ¶
type DockerProcessor struct {
}
func (DockerProcessor) Supports ¶
func (d DockerProcessor) Supports(filePath string) bool
type FilePatternsProcessor ¶
type FilePatternsProcessor struct {
Patterns []Pattern
}
func NewFilePatternsProcessor ¶
func NewFilePatternsProcessor(fs fs.FS) *FilePatternsProcessor
func (*FilePatternsProcessor) CompilePatterns ¶
func (s *FilePatternsProcessor) CompilePatterns()
func (*FilePatternsProcessor) Supports ¶
func (s *FilePatternsProcessor) Supports(path string) bool
type FileProcessor ¶
type FileProcessor interface {
Supports(filePath string) bool
Process(path string, repoName string, content string) ([]Match, error)
}
FileProcessor is an interface that defines a generic processor.
func InitializeProcessors ¶
func InitializeProcessors() []FileProcessor
InitializeProcessors creates and returns a slice of FileProcessor implementations.
type LibrariesProcessor ¶
type LibrariesProcessor struct {
// contains filtered or unexported fields
}
func NewLibrariesProcessor ¶
func NewLibrariesProcessor() *LibrariesProcessor
func (*LibrariesProcessor) Supports ¶
func (mp *LibrariesProcessor) Supports(filePath string) bool
type Pattern ¶
type Pattern struct {
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
Category string `json:"category,omitempty"`
Filenames []string `json:"file_names,omitempty"`
FileExtensions []string `json:"file_extensions,omitempty"`
ContentPatterns []string `json:"content_patterns,omitempty"`
FilenameRegexs []*regexp.Regexp
ContentPatternRegexs []*regexp.Regexp
Properties map[string]interface{} `json:"properties,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.