resolver

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resolver

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

Resolver handles guide resolution based on configuration patterns. It determines which review guides should be applied to specific files.

func NewResolver

func NewResolver(cfg *config.Config) *Resolver

NewResolver creates a new resolver with the given configuration. The resolver uses the config to match files and determine appropriate guides.

func (*Resolver) GetDiffGuides

func (r *Resolver) GetDiffGuides(filename string) ([]string, error)

GetDiffGuides returns the diff-specific guide files for a given filename. Uses diff_context guides which focus on change impact rather than full file review.

func (*Resolver) GetGuides

func (r *Resolver) GetGuides(filename string) ([]string, error)

GetGuides returns the appropriate review guide files for a given filename. Performs pattern matching and returns the context guides for matched patterns.

func (*Resolver) LoadGuideContent

func (r *Resolver) LoadGuideContent(guides []string) (
	map[string]string, error,
)

LoadGuideContent loads the content of guide files from disk. Tries multiple paths for each guide and returns a map of guide name to content.

func (*Resolver) ShouldReview

func (r *Resolver) ShouldReview(filename string) bool

ShouldReview returns true if the file matches any patterns and should be reviewed. Used to filter files before performing expensive review operations.

Jump to

Keyboard shortcuts

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