internal

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Logger *slog.Logger
)

Functions

func InitLogger

func InitLogger(debug bool)

Types

type Config

type Config struct {
	// GitHub settings
	GitHubToken  string // Optional for local
	GitHubAPIURL string

	// LLM settings
	LLMAPIKey   string `validate:"required"`
	LLMModel    string
	LLMProvider string
	LLMBaseURL  string

	// Review settings
	StyleGuideRules string

	// CLI/Action context
	PRNumber        int
	Repository      string
	GitHubEventPath string

	// Output settings
	UpdatePRTitle bool
	UpdatePRBody  bool

	// Review action settings
	AutoApproveThreshold int  // Score threshold for auto-approve (default: 90)
	BlockOnCritical      bool // Request changes when critical issues found (default: true)

	// CLI settings
	Debug                bool
	SkipGitHubValidation bool

	// Discovery settings
	AutoDiscoverPractices bool   // Enable auto-discovery of repo practices (default: true)
	DiscoveredPractices   string // Content discovered from repo practice files

	// File-based config
	IgnorePatterns []string            // Patterns to ignore during review
	PathRules      map[string]PathRule // Path-specific rules
}

func LoadConfig

func LoadConfig() (*Config, error)

func (*Config) GetExtraRulesForFile

func (c *Config) GetExtraRulesForFile(filename string) string

GetExtraRulesForFile returns extra rules that apply to a specific file

func (*Config) ShouldIgnoreFile

func (c *Config) ShouldIgnoreFile(filename string) bool

ShouldIgnoreFile checks if a file should be ignored based on ignore patterns

func (*Config) Validate

func (c *Config) Validate() error

type PathRule

type PathRule struct {
	SeverityOverride string
	ExtraRules       string
	Ignore           bool
}

PathRule defines rules for specific file paths (mirrored from pkg/config)

Jump to

Keyboard shortcuts

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