Centralize output schema and module key validation catalogs

This commit is contained in:
2026-05-23 17:39:13 +00:00
parent fa1bd237d1
commit 938bfe88c1
14 changed files with 233 additions and 101 deletions

View File

@@ -6,6 +6,7 @@ import (
"strings"
"gitea.maximumdirect.net/eric/audita/internal/core/config"
"gitea.maximumdirect.net/eric/audita/internal/core/modulecatalog"
"gitea.maximumdirect.net/eric/audita/internal/core/schema"
"gitea.maximumdirect.net/eric/audita/internal/framework/proposals"
stagewarnings "gitea.maximumdirect.net/eric/audita/internal/framework/warnings"
@@ -118,13 +119,13 @@ func confidenceThresholdForModule(moduleKey string, cfg *config.Config) float64
return 0.0
}
switch moduleKey {
case "glossary":
case modulecatalog.KeyGlossary:
return cfg.Thresholds.Glossary
case "grammar":
case modulecatalog.KeyGrammar:
return cfg.Thresholds.Grammar
case "homophones":
case modulecatalog.KeyHomophones:
return cfg.Thresholds.Homophones
case "spoken_word":
case modulecatalog.KeySpokenWord:
return cfg.Thresholds.SpokenWord
default:
return 0.0