Documentation
¶
Overview ¶
Package config handles loading and validating .contextception/config.yaml.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Version int `yaml:"version"`
Entrypoints []string `yaml:"entrypoints,omitempty"`
Ignore []string `yaml:"ignore,omitempty"`
Generated []string `yaml:"generated,omitempty"`
}
Config represents the user's repository configuration.
func Empty ¶
func Empty() *Config
Empty returns a zero-value config where all predicates return false.
func Load ¶
Load reads .contextception/config.yaml from repoRoot. Returns Empty() if the file does not exist. Returns an error if the file exists but is malformed or contains unknown keys.
func (*Config) IsConfigEntrypoint ¶
IsConfigEntrypoint returns true if path exactly matches a config entrypoint.
func (*Config) IsGenerated ¶
IsGenerated returns true if path matches any config generated prefix.
type GlobalConfig ¶ added in v1.0.3
type GlobalConfig struct {
Update UpdateConfig `yaml:"update"`
}
GlobalConfig represents the user's global contextception configuration, stored at {configDir}/contextception/config.yaml.
func DefaultGlobal ¶ added in v1.0.3
func DefaultGlobal() *GlobalConfig
DefaultGlobal returns a GlobalConfig with all default values applied. Update.Check defaults to true.
func LoadGlobal ¶ added in v1.0.3
func LoadGlobal(configDir string) *GlobalConfig
LoadGlobal reads {configDir}/contextception/config.yaml and returns a GlobalConfig. It returns defaults if the file is missing or malformed — global config is tolerant by design since it may evolve over time.
type RepoProfile ¶
type RepoProfile struct {
Type string // monorepo, python-package, go-module, ts-project, mixed, unknown
Signals []string // detection signals found
Entrypoints []string // auto-detected entrypoints
}
RepoProfile represents an auto-detected repository type.
func DetectRepoProfile ¶
func DetectRepoProfile(repoRoot string) RepoProfile
DetectRepoProfile detects the repository type from file structure. Returns a profile with type and suggested entrypoints.
type UpdateConfig ¶ added in v1.0.3
type UpdateConfig struct {
Check bool `yaml:"check"`
}
UpdateConfig holds update-check settings.