Validate configuration source keys and overrides

This commit is contained in:
2026-08-13 00:15:26 +00:00
parent 5139c1a586
commit 26a681e0b1
7 changed files with 173 additions and 17 deletions

View File

@@ -53,6 +53,9 @@ func Validate(cfg Config) error {
if strings.TrimSpace(source) == "" {
return fmt.Errorf("missing_source.sources contains an empty source name")
}
if !IsSupportedMissingSource(source) {
return fmt.Errorf("missing_source.sources.%s is not a supported optional source", source)
}
if err := validatePolicy("missing_source.sources."+source, policy); err != nil {
return err
}