common/travis/xlint.sh: print Github annotations
Turns xlint, version lint, and commit lint messages into warning or error annotaions. All are printed with special highlighting in the action log and summary. Xlint and version lint annotations are shown inline in the changes tab and commit view. Annotations without line number are shown at line 1.
This commit is contained in:
parent
e900c63cf9
commit
cc27e8e6f7
3 changed files with 19 additions and 7 deletions
11
common/scripts/lint2annotations.awk
Normal file
11
common/scripts/lint2annotations.awk
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Converts xlint/etc format lints into GH Actions annotations
|
||||
# The original line is printed alongside the annotation command
|
||||
{
|
||||
split($0, a, ": ")
|
||||
split(a[1], b, ":")
|
||||
msg = substr($0, index($0, ": ") + 2)
|
||||
if (b[2]) {
|
||||
line = ",line=" b[2]
|
||||
}
|
||||
printf "::error title=Template Lint,file=%s%s::%s\n", b[1], line, msg
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue