@@ -144,12 +144,18 @@ func setupDiffReport(r *Report) {
144144 r .format .changestyles ["REMOVE" ] = ChangeStyle {color : "red" , message : "has been removed:" }
145145 r .format .changestyles ["MODIFY" ] = ChangeStyle {color : "yellow" , message : "has changed:" }
146146 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." }
147148}
148149
149150// print report for default output: diff
150151func printDiffReport (r * Report , to io.Writer ) {
151152 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+ )
153159 printDiffRecords (entry .suppressedKinds , entry .kind , entry .context , entry .diffs , to )
154160 }
155161}
@@ -162,15 +168,17 @@ func setupSimpleReport(r *Report) {
162168 r .format .changestyles ["REMOVE" ] = ChangeStyle {color : "red" , message : "to be removed." }
163169 r .format .changestyles ["MODIFY" ] = ChangeStyle {color : "yellow" , message : "to be changed." }
164170 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." }
165172}
166173
167174// print report for simple output
168175func printSimpleReport (r * Report , to io.Writer ) {
169176 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 ,
174182 }
175183 for _ , entry := range r .entries {
176184 _ , _ = fmt .Fprintf (to , ansi .Color ("%s %s" , r .format .changestyles [entry .changeType ].color )+ "\n " ,
@@ -206,6 +214,7 @@ func setupJSONReport(r *Report) {
206214 r .format .changestyles ["REMOVE" ] = ChangeStyle {color : "red" , message : "" }
207215 r .format .changestyles ["MODIFY" ] = ChangeStyle {color : "yellow" , message : "" }
208216 r .format .changestyles ["OWNERSHIP" ] = ChangeStyle {color : "magenta" , message : "" }
217+ r .format .changestyles ["MODIFY_SUPPRESSED" ] = ChangeStyle {color : "blue+h" , message : "" }
209218}
210219
211220// setup report for template output
@@ -237,6 +246,7 @@ func setupTemplateReport(r *Report) {
237246 r .format .changestyles ["REMOVE" ] = ChangeStyle {color : "red" , message : "" }
238247 r .format .changestyles ["MODIFY" ] = ChangeStyle {color : "yellow" , message : "" }
239248 r .format .changestyles ["OWNERSHIP" ] = ChangeStyle {color : "magenta" , message : "" }
249+ r .format .changestyles ["MODIFY_SUPPRESSED" ] = ChangeStyle {color : "blue+h" , message : "" }
240250}
241251
242252// report with template output will only have access to ReportTemplateSpec.
0 commit comments