Prepare resolved documents and autocorrection rules
This commit is contained in:
@@ -53,24 +53,19 @@ type remoteLocksCheck struct {
|
||||
|
||||
func inspectStableInputs(cfg *config.Config) []stableInputCheck {
|
||||
items := []struct {
|
||||
name string
|
||||
in config.ResolvedInputFile
|
||||
optional bool
|
||||
derived bool
|
||||
name string
|
||||
in config.ResolvedInputFile
|
||||
derived string
|
||||
}{
|
||||
{name: "speakers", in: cfg.StableInputs.SpeakersFile},
|
||||
{name: "autocorrect", in: cfg.StableInputs.AutocorrectFile},
|
||||
{name: "players", derived: true},
|
||||
{name: "autocorrect", derived: "derived from configuration"},
|
||||
{name: "players", derived: "derived from canonical party"},
|
||||
{name: "party", in: cfg.StableInputs.PartyFile},
|
||||
{name: "spell_catalog", in: cfg.StableInputs.SpellCatalogFile, optional: true},
|
||||
}
|
||||
out := make([]stableInputCheck, 0, len(items))
|
||||
for _, item := range items {
|
||||
if item.derived {
|
||||
out = append(out, stableInputCheck{Name: item.name, Path: "derived from canonical party"})
|
||||
continue
|
||||
}
|
||||
if item.optional && strings.TrimSpace(item.in.Path) == "" {
|
||||
if item.derived != "" {
|
||||
out = append(out, stableInputCheck{Name: item.name, Path: item.derived})
|
||||
continue
|
||||
}
|
||||
path, err := resolveHelperConfigRelativePath(item.in)
|
||||
|
||||
Reference in New Issue
Block a user