You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pkg/analysis/conditions/testdata/src/a/a.go
+11-11Lines changed: 11 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -32,48 +32,48 @@ type ConditionsNotFirst struct {
32
32
// +patchStrategy=merge
33
33
// +patchMergeKey=type
34
34
// +optional
35
-
Conditions []metav1.Condition`json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`// want "Conditions field must be the first field in the struct"
35
+
Conditions []metav1.Condition`json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`// want "Conditions field in ConditionsNotFirst must be the first field in the struct"
36
36
}
37
37
38
38
typeConditionsIncorrectTypestruct {
39
39
// conditions has an incorrect type.
40
-
Conditionsmap[string]metav1.Condition// want "Conditions field must be a slice of metav1.Condition"
40
+
Conditionsmap[string]metav1.Condition// want "Conditions field in ConditionsIncorrectType must be a slice of metav1.Condition"
41
41
}
42
42
43
43
typeConditionsIncorrectSliceElementstruct {
44
44
// conditions has an incorrect type.
45
-
Conditions []string// want "Conditions field must be a slice of metav1.Condition"
45
+
Conditions []string// want "Conditions field in ConditionsIncorrectSliceElement must be a slice of metav1.Condition"
Conditions []metav1.Time// want "Conditions field must be a slice of metav1.Condition"
50
+
Conditions []metav1.Time// want "Conditions field in ConditionsIncorrectImportedSliceElement must be a slice of metav1.Condition"
51
51
}
52
52
53
53
typeConditionsIncorrectImportedPackagestruct {
54
54
// conditions has an incorrect type.
55
-
Conditions []ast.Node// want "Conditions field must be a slice of metav1.Condition"
55
+
Conditions []ast.Node// want "Conditions field in ConditionsIncorrectImportedPackage must be a slice of metav1.Condition"
56
56
}
57
57
58
58
typeMissingAllMarkersstruct {
59
59
// conditions is missing all markers.
60
-
Conditions []metav1.Condition`json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`// want "Conditions field is missing the following markers: listType=map, listMapKey=type, patchStrategy=merge, patchMergeKey=type, optional"
60
+
Conditions []metav1.Condition`json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`// want "Conditions field in MissingAllMarkers is missing the following markers: listType=map, listMapKey=type, patchStrategy=merge, patchMergeKey=type, optional"
61
61
}
62
62
63
63
typeMissingListMarkersstruct {
64
64
// conditions is missing list markers.
65
65
// +patchStrategy=merge
66
66
// +patchMergeKey=type
67
67
// +optional
68
-
Conditions []metav1.Condition`json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`// want "Conditions field is missing the following markers: listType=map, listMapKey=type"
68
+
Conditions []metav1.Condition`json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`// want "Conditions field in MissingListMarkers is missing the following markers: listType=map, listMapKey=type"
69
69
}
70
70
71
71
typeMissingPatchMarkersstruct {
72
72
// conditions is missing patch markers.
73
73
// +listType=map
74
74
// +listMapKey=type
75
75
// +optional
76
-
Conditions []metav1.Condition`json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`// want "Conditions field is missing the following markers: patchStrategy=merge, patchMergeKey=type"
76
+
Conditions []metav1.Condition`json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`// want "Conditions field in MissingPatchMarkers is missing the following markers: patchStrategy=merge, patchMergeKey=type"
77
77
}
78
78
79
79
typeMissingOptionalMarkerstruct {
@@ -82,7 +82,7 @@ type MissingOptionalMarker struct {
82
82
// +listMapKey=type
83
83
// +patchStrategy=merge
84
84
// +patchMergeKey=type
85
-
Conditions []metav1.Condition`json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`// want "Conditions field is missing the following markers: optional"
85
+
Conditions []metav1.Condition`json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`// want "Conditions field in MissingOptionalMarker is missing the following markers: optional"
86
86
}
87
87
88
88
typeMissingFieldTagstruct {
@@ -92,7 +92,7 @@ type MissingFieldTag struct {
92
92
// +patchStrategy=merge
93
93
// +patchMergeKey=type
94
94
// +optional
95
-
Conditions []metav1.Condition// want "Conditions field is missing tags, should be: `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`"
95
+
Conditions []metav1.Condition// want "Conditions field in MissingFieldTag is missing tags, should be: `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`"
96
96
}
97
97
98
98
typeIncorrectFieldTagstruct {
@@ -102,5 +102,5 @@ type IncorrectFieldTag struct {
102
102
// +patchStrategy=merge
103
103
// +patchMergeKey=type
104
104
// +optional
105
-
Conditions []metav1.Condition`json:"conditions" patchMergeKey:"type" protobuf:"bytes,3,rep,name=conditions"`// want "Conditions field has incorrect tags, should be: `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`"
105
+
Conditions []metav1.Condition`json:"conditions" patchMergeKey:"type" protobuf:"bytes,3,rep,name=conditions"`// want "Conditions field in IncorrectFieldTag has incorrect tags, should be: `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`"
Copy file name to clipboardExpand all lines: pkg/analysis/conditions/testdata/src/a/a.go.golden
+11-11Lines changed: 11 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -32,27 +32,27 @@ type ConditionsNotFirst struct {
32
32
// +patchStrategy=merge
33
33
// +patchMergeKey=type
34
34
// +optional
35
-
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` // want "Conditions field must be the first field in the struct"
35
+
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` // want "Conditions field in ConditionsNotFirst must be the first field in the struct"
36
36
}
37
37
38
38
type ConditionsIncorrectType struct {
39
39
// conditions has an incorrect type.
40
-
Conditions map[string]metav1.Condition // want "Conditions field must be a slice of metav1.Condition"
40
+
Conditions map[string]metav1.Condition // want "Conditions field in ConditionsIncorrectType must be a slice of metav1.Condition"
41
41
}
42
42
43
43
type ConditionsIncorrectSliceElement struct {
44
44
// conditions has an incorrect type.
45
-
Conditions []string // want "Conditions field must be a slice of metav1.Condition"
45
+
Conditions []string // want "Conditions field in ConditionsIncorrectSliceElement must be a slice of metav1.Condition"
46
46
}
47
47
48
48
type ConditionsIncorrectImportedSliceElement struct {
49
49
// conditions has an incorrect type.
50
-
Conditions []metav1.Time // want "Conditions field must be a slice of metav1.Condition"
50
+
Conditions []metav1.Time // want "Conditions field in ConditionsIncorrectImportedSliceElement must be a slice of metav1.Condition"
51
51
}
52
52
53
53
type ConditionsIncorrectImportedPackage struct {
54
54
// conditions has an incorrect type.
55
-
Conditions []ast.Node // want "Conditions field must be a slice of metav1.Condition"
55
+
Conditions []ast.Node // want "Conditions field in ConditionsIncorrectImportedPackage must be a slice of metav1.Condition"
56
56
}
57
57
58
58
type MissingAllMarkers struct {
@@ -62,7 +62,7 @@ type MissingAllMarkers struct {
62
62
// +patchStrategy=merge
63
63
// +patchMergeKey=type
64
64
// +optional
65
-
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` // want "Conditions field is missing the following markers: listType=map, listMapKey=type, patchStrategy=merge, patchMergeKey=type, optional"
65
+
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` // want "Conditions field in MissingAllMarkers is missing the following markers: listType=map, listMapKey=type, patchStrategy=merge, patchMergeKey=type, optional"
66
66
}
67
67
68
68
type MissingListMarkers struct {
@@ -72,7 +72,7 @@ type MissingListMarkers struct {
72
72
// +optional
73
73
// +listType=map
74
74
// +listMapKey=type
75
-
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` // want "Conditions field is missing the following markers: listType=map, listMapKey=type"
75
+
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` // want "Conditions field in MissingListMarkers is missing the following markers: listType=map, listMapKey=type"
76
76
}
77
77
78
78
type MissingPatchMarkers struct {
@@ -82,7 +82,7 @@ type MissingPatchMarkers struct {
82
82
// +optional
83
83
// +patchStrategy=merge
84
84
// +patchMergeKey=type
85
-
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` // want "Conditions field is missing the following markers: patchStrategy=merge, patchMergeKey=type"
85
+
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` // want "Conditions field in MissingPatchMarkers is missing the following markers: patchStrategy=merge, patchMergeKey=type"
86
86
}
87
87
88
88
type MissingOptionalMarker struct {
@@ -92,7 +92,7 @@ type MissingOptionalMarker struct {
92
92
// +patchStrategy=merge
93
93
// +patchMergeKey=type
94
94
// +optional
95
-
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` // want "Conditions field is missing the following markers: optional"
95
+
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` // want "Conditions field in MissingOptionalMarker is missing the following markers: optional"
96
96
}
97
97
98
98
type MissingFieldTag struct {
@@ -102,7 +102,7 @@ type MissingFieldTag struct {
102
102
// +patchStrategy=merge
103
103
// +patchMergeKey=type
104
104
// +optional
105
-
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` // want "Conditions field is missing tags, should be: `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`"
105
+
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` // want "Conditions field in MissingFieldTag is missing tags, should be: `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`"
106
106
}
107
107
108
108
type IncorrectFieldTag struct {
@@ -112,5 +112,5 @@ type IncorrectFieldTag struct {
112
112
// +patchStrategy=merge
113
113
// +patchMergeKey=type
114
114
// +optional
115
-
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` // want "Conditions field has incorrect tags, should be: `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`"
115
+
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` // want "Conditions field in IncorrectFieldTag has incorrect tags, should be: `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`"
0 commit comments