@@ -144,12 +144,18 @@ func setupDiffReport(r *Report) {
144
144
r .format .changestyles ["REMOVE" ] = ChangeStyle {color : "red" , message : "has been removed:" }
145
145
r .format .changestyles ["MODIFY" ] = ChangeStyle {color : "yellow" , message : "has changed:" }
146
146
r .format .changestyles ["OWNERSHIP" ] = ChangeStyle {color : "magenta" , message : "changed ownership:" }
147
+ r .format .changestyles ["MODIFY_SUPPRESSED" ] = ChangeStyle {color : "blue+h" , message : "has changed, but diff is empty after suppression." }
147
148
}
148
149
149
150
// print report for default output: diff
150
151
func printDiffReport (r * Report , to io.Writer ) {
151
152
for _ , entry := range r .entries {
152
- _ , _ = fmt .Fprintf (to , ansi .Color ("%s %s" , "yellow" )+ "\n " , entry .key , r .format .changestyles [entry .changeType ].message )
153
+ _ , _ = fmt .Fprintf (
154
+ to ,
155
+ ansi .Color ("%s %s" , r .format .changestyles [entry .changeType ].color )+ "\n " ,
156
+ entry .key ,
157
+ r .format .changestyles [entry .changeType ].message ,
158
+ )
153
159
printDiffRecords (entry .suppressedKinds , entry .kind , entry .context , entry .diffs , to )
154
160
}
155
161
}
@@ -162,15 +168,17 @@ func setupSimpleReport(r *Report) {
162
168
r .format .changestyles ["REMOVE" ] = ChangeStyle {color : "red" , message : "to be removed." }
163
169
r .format .changestyles ["MODIFY" ] = ChangeStyle {color : "yellow" , message : "to be changed." }
164
170
r .format .changestyles ["OWNERSHIP" ] = ChangeStyle {color : "magenta" , message : "to change ownership." }
171
+ r .format .changestyles ["MODIFY_SUPPRESSED" ] = ChangeStyle {color : "blue+h" , message : "has changed, but diff is empty after suppression." }
165
172
}
166
173
167
174
// print report for simple output
168
175
func printSimpleReport (r * Report , to io.Writer ) {
169
176
var summary = map [string ]int {
170
- "ADD" : 0 ,
171
- "REMOVE" : 0 ,
172
- "MODIFY" : 0 ,
173
- "OWNERSHIP" : 0 ,
177
+ "ADD" : 0 ,
178
+ "REMOVE" : 0 ,
179
+ "MODIFY" : 0 ,
180
+ "OWNERSHIP" : 0 ,
181
+ "MODIFY_SUPPRESSED" : 0 ,
174
182
}
175
183
for _ , entry := range r .entries {
176
184
_ , _ = fmt .Fprintf (to , ansi .Color ("%s %s" , r .format .changestyles [entry .changeType ].color )+ "\n " ,
@@ -206,6 +214,7 @@ func setupJSONReport(r *Report) {
206
214
r .format .changestyles ["REMOVE" ] = ChangeStyle {color : "red" , message : "" }
207
215
r .format .changestyles ["MODIFY" ] = ChangeStyle {color : "yellow" , message : "" }
208
216
r .format .changestyles ["OWNERSHIP" ] = ChangeStyle {color : "magenta" , message : "" }
217
+ r .format .changestyles ["MODIFY_SUPPRESSED" ] = ChangeStyle {color : "blue+h" , message : "" }
209
218
}
210
219
211
220
// setup report for template output
@@ -237,6 +246,7 @@ func setupTemplateReport(r *Report) {
237
246
r .format .changestyles ["REMOVE" ] = ChangeStyle {color : "red" , message : "" }
238
247
r .format .changestyles ["MODIFY" ] = ChangeStyle {color : "yellow" , message : "" }
239
248
r .format .changestyles ["OWNERSHIP" ] = ChangeStyle {color : "magenta" , message : "" }
249
+ r .format .changestyles ["MODIFY_SUPPRESSED" ] = ChangeStyle {color : "blue+h" , message : "" }
240
250
}
241
251
242
252
// report with template output will only have access to ReportTemplateSpec.
0 commit comments