tools: Add colored icons to the CTS roll msgs
Should help quickly identify errors vs warnings vs notes Bug: dawn:1342 Change-Id: I8063be0d7cff06428be998a6fa0ad76048ccbc29 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91960 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
1b69b8ad99
commit
53edbc7635
|
@ -467,11 +467,20 @@ func (r *roller) rollCommitMessage(
|
|||
func (r *roller) postComments(ps gerrit.Patchset, diags []expectations.Diagnostic, results result.List) error {
|
||||
fc := make([]gerrit.FileComment, len(diags))
|
||||
for i, d := range diags {
|
||||
var prefix string
|
||||
switch d.Severity {
|
||||
case expectations.Error:
|
||||
prefix = "🟥"
|
||||
case expectations.Warning:
|
||||
prefix = "🟨"
|
||||
case expectations.Note:
|
||||
prefix = "🟦"
|
||||
}
|
||||
fc[i] = gerrit.FileComment{
|
||||
Path: common.RelativeExpectationsPath,
|
||||
Side: gerrit.Left,
|
||||
Line: d.Line,
|
||||
Message: fmt.Sprintf("%v: %v", d.Severity, d.Message),
|
||||
Message: fmt.Sprintf("%v %v: %v", prefix, d.Severity, d.Message),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue