diff --git a/components/errdoc/errdoc-gen/main.go b/components/errdoc/errdoc-gen/main.go index 42be8daf55..1b950c5245 100644 --- a/components/errdoc/errdoc-gen/main.go +++ b/components/errdoc/errdoc-gen/main.go @@ -244,7 +244,8 @@ func errdoc(source, module string) ([]*errDecl, error) { fset := token.NewFileSet() file, err := parser.ParseFile(fset, path, nil, parser.ParseComments) if err != nil { - return err + // Ignore invalid source file + return nil } errNames := export(file) if len(errNames) < 1 {