Autogen categories
This commit is contained in:
@@ -395,8 +395,6 @@ type HeadVisualeffectsConfig struct {
|
||||
StripModelPrefixes []string `json:"strip_model_prefixes,omitempty" yaml:"strip_model_prefixes"`
|
||||
KeyFormat string `json:"key_format,omitempty" yaml:"key_format"`
|
||||
LabelFormat string `json:"label_format,omitempty" yaml:"label_format"`
|
||||
LegacyGroups map[string]string `json:"legacy_groups,omitempty" yaml:"legacy_groups"`
|
||||
LegacyKeyFormat string `json:"legacy_key_format,omitempty" yaml:"legacy_key_format"`
|
||||
ModelColumn string `json:"model_column,omitempty" yaml:"model_column"`
|
||||
RowDefaults map[string]string `json:"row_defaults,omitempty" yaml:"row_defaults"`
|
||||
}
|
||||
@@ -1820,8 +1818,6 @@ func headVisualeffectsConfigConfigured(cfg HeadVisualeffectsConfig) bool {
|
||||
len(cfg.StripModelPrefixes) > 0 ||
|
||||
strings.TrimSpace(cfg.KeyFormat) != "" ||
|
||||
strings.TrimSpace(cfg.LabelFormat) != "" ||
|
||||
len(cfg.LegacyGroups) > 0 ||
|
||||
strings.TrimSpace(cfg.LegacyKeyFormat) != "" ||
|
||||
strings.TrimSpace(cfg.ModelColumn) != "" ||
|
||||
len(cfg.RowDefaults) > 0
|
||||
}
|
||||
@@ -1888,21 +1884,6 @@ func validateHeadVisualeffectsConfig(fieldPrefix string, cfg HeadVisualeffectsCo
|
||||
}
|
||||
}
|
||||
}
|
||||
for legacyGroup, group := range cfg.LegacyGroups {
|
||||
legacyGroup = strings.TrimSpace(legacyGroup)
|
||||
group = strings.TrimSpace(group)
|
||||
if legacyGroup == "" {
|
||||
failures = append(failures, fmt.Errorf("%s.legacy_groups contains an empty legacy group key", fieldPrefix))
|
||||
continue
|
||||
}
|
||||
if group == "" {
|
||||
failures = append(failures, fmt.Errorf("%s.legacy_groups[%s] must not be empty", fieldPrefix, legacyGroup))
|
||||
}
|
||||
failures = append(failures, validateTreeRootPath(fieldPrefix+".legacy_groups["+legacyGroup+"]", legacyGroup)...)
|
||||
if group != "" {
|
||||
failures = append(failures, validateTreeRootPath(fieldPrefix+".legacy_groups["+legacyGroup+"]", group)...)
|
||||
}
|
||||
}
|
||||
for index, prefix := range cfg.StripModelPrefixes {
|
||||
if strings.TrimSpace(prefix) == "" {
|
||||
failures = append(failures, fmt.Errorf("%s.strip_model_prefixes[%d] must not be empty", fieldPrefix, index))
|
||||
|
||||
Reference in New Issue
Block a user