File tree Expand file tree Collapse file tree 8 files changed +36
-8
lines changed Expand file tree Collapse file tree 8 files changed +36
-8
lines changed Original file line number Diff line number Diff line change 17
17
[._ ]s [a-w ][a-z ]
18
18
* .un~
19
19
Session.vim
20
- .netrwhist
20
+ .netrwhist
21
+
22
+ # Files generated by JetBrains IDEs, e.g. IntelliJ IDEA
23
+ .idea /
Original file line number Diff line number Diff line change @@ -46,6 +46,6 @@ func run() int {
46
46
return 1
47
47
}
48
48
49
- fmt .Println ("No validation errors" )
49
+ fmt .Printf ("No validation errors : %v \n " , os . Args [ 1 :] )
50
50
return 0
51
51
}
Original file line number Diff line number Diff line change @@ -73,7 +73,10 @@ func ignore(name string) bool {
73
73
if ! strings .HasSuffix (name , "md" ) {
74
74
return true
75
75
}
76
- if name == "0023-documentation-for-images.md" {
76
+ if name == "0023-documentation-for-images.md" ||
77
+ name == "0004-cloud-provider-template.md" ||
78
+ name == "README.md" ||
79
+ name == "kep-faq.md" {
77
80
return true
78
81
}
79
82
return false
Original file line number Diff line number Diff line change @@ -10,8 +10,7 @@ reviewers:
10
10
- " @mengqiy"
11
11
approvers :
12
12
- " @monopole"
13
- editors :
14
- - " @Liujingfang1"
13
+ editor : " @Liujingfang1"
15
14
creation-date : 2019-03-14
16
15
last-updated : 2019-03-18
17
16
status : implementable
Original file line number Diff line number Diff line change 2
2
title : Leveraging Distributed Tracing to Understand Kubernetes Object Lifecycles
3
3
authors :
4
4
- " @Monkeyanator"
5
- editors :
6
- - " @dashpole"
5
+ editor : " @dashpole"
7
6
owning-sig : sig-instrumentation
8
7
participating-sigs :
9
8
- sig-architecture
Original file line number Diff line number Diff line change
1
+ ---
2
+ title : Move ExternalDNS out of Kubernetes incubator
3
+ authors :
4
+ - " @njuettner"
5
+ owning-sig : sig-network
6
+ ---
7
+
1
8
# Move ExternalDNS out of Kubernetes incubator
2
9
3
10
## Table of Contents
Original file line number Diff line number Diff line change @@ -93,6 +93,6 @@ func (p *Parser) Parse(in io.Reader) *Proposal {
93
93
return proposal
94
94
}
95
95
96
- proposal .Error = yaml .Unmarshal (metadata , proposal )
96
+ proposal .Error = yaml .UnmarshalStrict (metadata , proposal )
97
97
return proposal
98
98
}
Original file line number Diff line number Diff line change @@ -21,6 +21,14 @@ import (
21
21
"strings"
22
22
)
23
23
24
+ type KeyMustBeSpecified struct {
25
+ key interface {}
26
+ }
27
+
28
+ func (k * KeyMustBeSpecified ) Error () string {
29
+ return fmt .Sprintf ("missing key %[1]v" , k .key )
30
+ }
31
+
24
32
type KeyMustBeString struct {
25
33
key interface {}
26
34
}
@@ -62,7 +70,16 @@ type MustHaveAtLeastOneValue struct {
62
70
func (m * MustHaveAtLeastOneValue ) Error () string {
63
71
return fmt .Sprintf ("%q must have at least one value" , m .key )
64
72
}
73
+
74
+ var mandatoryKeys = []string {"title" , "owning-sig" }
75
+
65
76
func ValidateStructure (parsed map [interface {}]interface {}) error {
77
+ for _ , key := range mandatoryKeys {
78
+ if _ , found := parsed [key ]; ! found {
79
+ return & KeyMustBeSpecified {key }
80
+ }
81
+ }
82
+
66
83
for key , value := range parsed {
67
84
// First off the key has to be a string. fact.
68
85
k , ok := key .(string )
You can’t perform that action at this time.
0 commit comments