File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ limitations under the License.
17
17
package repo
18
18
19
19
import (
20
+ "fmt"
20
21
"os"
21
22
"path/filepath"
22
23
@@ -63,6 +64,7 @@ func (r *Repo) Validate() (
63
64
64
65
metadataFilename := ProposalMetadataFilename
65
66
metadataFilepath := filepath .Join (dir , metadataFilename )
67
+
66
68
if _ , err := os .Stat (metadataFilepath ); err == nil {
67
69
// There is KEP metadata file in this directory, only that one should be processed.
68
70
if info .Name () == metadataFilename {
@@ -71,6 +73,14 @@ func (r *Repo) Validate() (
71
73
}
72
74
}
73
75
76
+ if info .Name () == ProposalFilename && dir != kepDir {
77
+ // There is a proposal, we require metadata file for it.
78
+ if _ , err := os .Stat (metadataFilepath ); os .IsNotExist (err ) {
79
+ kepErr := fmt .Errorf ("metadata file missing for KEP: %s" , metadataFilepath )
80
+ valErrMap [metadataFilepath ] = append (valErrMap [metadataFilepath ], kepErr )
81
+ }
82
+ }
83
+
74
84
return nil
75
85
},
76
86
)
You can’t perform that action at this time.
0 commit comments