Add strict custom field registry
This commit is contained in:
@@ -28,6 +28,7 @@ func (p *Project) Validate(stage string) Report {
|
||||
report.addError("unsupported_gsp_version", "", p.Manifest.File, fmt.Sprintf("GSP version %q is not supported by this toolkit", p.Manifest.GSPVersion))
|
||||
}
|
||||
}
|
||||
p.validateFieldRegistry(&report)
|
||||
for _, unit := range p.Units {
|
||||
if unit.ID == "" {
|
||||
report.addError("missing_id", "", unit.File, "GSP requires id")
|
||||
@@ -66,6 +67,7 @@ func (p *Project) Validate(stage string) Report {
|
||||
if unit.Context == "" {
|
||||
report.addNotice("placeholder", unit.ID, unit.File, "GSP has no context and is treated as placeholder")
|
||||
}
|
||||
p.validateCustomFields(&report, unit)
|
||||
}
|
||||
for id, units := range p.Duplicates {
|
||||
files := make([]string, 0, len(units))
|
||||
|
||||
Reference in New Issue
Block a user