patterns

package
v0.0.0-...-aabf2b0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pattern

type Pattern interface {
	GetPatternName() string
	GetMatches(filename string, file []byte) []string
	GetFindingPriority() interfaces.FindingPriority
	PerformQualityCheck(originalFinding interfaces.Finding, fileToCheck interfaces.LoadedFile, llm interfaces.LlmConnector) interfaces.Finding
}

type RegexExpression

type RegexExpression struct {
	// contains filtered or unexported fields
}

type SimpleRegexPattern

type SimpleRegexPattern struct {
	RegexPattern []*RegexExpression
	PatternName  string
	Priority     interfaces.FindingPriority
	QualityCheck func(originalFinding interfaces.Finding, fileToCheck interfaces.LoadedFile, llm interfaces.LlmConnector) interfaces.Finding
}

func NewSimpleRegexPattern

func NewSimpleRegexPattern(patternName string, priority interfaces.FindingPriority) *SimpleRegexPattern

func (*SimpleRegexPattern) AddRegexPattern

func (pattern *SimpleRegexPattern) AddRegexPattern(regexPattern *regexp.Regexp, matchingGroup int)

func (*SimpleRegexPattern) GetFindingPriority

func (pattern *SimpleRegexPattern) GetFindingPriority() interfaces.FindingPriority

func (*SimpleRegexPattern) GetMatches

func (pattern *SimpleRegexPattern) GetMatches(fileName string, file []byte) []string

func (*SimpleRegexPattern) GetPatternName

func (pattern *SimpleRegexPattern) GetPatternName() string

func (*SimpleRegexPattern) PerformQualityCheck

func (pattern *SimpleRegexPattern) PerformQualityCheck(originalFinding interfaces.Finding, fileToCheck interfaces.LoadedFile, llm interfaces.LlmConnector) interfaces.Finding

func (*SimpleRegexPattern) SetQualityCheck

func (pattern *SimpleRegexPattern) SetQualityCheck(qualityCheck func(originalFinding interfaces.Finding, fileToCheck interfaces.LoadedFile, llm interfaces.LlmConnector) interfaces.Finding)

Jump to

Keyboard shortcuts

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