Skip to content

Commit 5ef922d

Browse files
committed
ensure name is set
1 parent d6f1969 commit 5ef922d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

generator/app.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ func (c *Context) Validate() []error {
469469
errors = append(errors, fmt.Errorf("%s: %s company: %q does not match other entries %q", group.Dir, val.GitHub, val.Company, person.Company))
470470
}
471471
}
472-
// all entries should have github + name, emeritus or not
472+
// all entries should have matching github + name, emeritus or not
473473
if val.Name != person.Name {
474474
errors = append(errors, fmt.Errorf("%s: %s: expected person: %v, got: %v", group.Dir, prefix, val, person))
475475
}
@@ -483,6 +483,9 @@ func (c *Context) Validate() []error {
483483
errors = append(errors, fmt.Errorf("%s: %s: company is empty but should be set", group.Dir, person.GitHub))
484484
}
485485
}
486+
if person.Name == "" {
487+
errors = append(errors, fmt.Errorf("%s: %s: name is empty but should be set", group.Dir, person.GitHub))
488+
}
486489

487490
if prefix == "emeritus_lead" && person.Company != "" {
488491
errors = append(errors, fmt.Errorf("%s: emeritus leads should not have company specified; company specified for: %s", group.Dir, person.Name))

0 commit comments

Comments
 (0)