search

package
v2.12.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 20 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDelimiters added in v2.11.5

func GetDelimiters(opts options.Options) []string

Get a list of delimiters to use for flag key matching If defaults are disabled, only additional configured delimiters will be used

func SearchForRefs

func SearchForRefs(directory string, matcher Matcher) ([]ld.ReferenceHunksRep, error)

Types

type ElementMatcher

type ElementMatcher struct {
	ProjKey  string
	Elements []string
	Dir      string
	// contains filtered or unexported fields
}

func NewElementMatcher

func NewElementMatcher(projKey, dir, delimiters string, elements []string, aliasesByElement map[string][]string) ElementMatcher

func (ElementMatcher) FindAliases

func (m ElementMatcher) FindAliases(line, element string) []string

func (ElementMatcher) FindMatches

func (m ElementMatcher) FindMatches(line string) []string

type Matcher

type Matcher struct {
	Elements []ElementMatcher
	// contains filtered or unexported fields
}

func NewMultiProjectMatcher added in v2.11.5

func NewMultiProjectMatcher(opts options.Options, dir string, flagKeys map[string][]string) Matcher

func Scan

func Scan(opts options.Options, repoParams ld.RepoParams, dir string) (Matcher, []ld.ReferenceHunksRep)

Scan checks the configured directory for flags based on the options configured for Code References.

func (Matcher) FindAliases

func (m Matcher) FindAliases(line, element string) []string

func (Matcher) GetElements

func (m Matcher) GetElements() (elements [][]string)

func (Matcher) GetProjectElementMatcher

func (m Matcher) GetProjectElementMatcher(projectKey string) *ElementMatcher

func (Matcher) MatchElement

func (m Matcher) MatchElement(line, element string) bool

Jump to

Keyboard shortcuts

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