1
0
Fork 0
mirror of https://github.com/xHyroM/void-packages.git synced 2024-12-23 20:51:05 +01:00
void-packages/common/scripts/lint2annotations.awk

12 lines
320 B
Awk
Raw Normal View History

2024-03-29 08:12:19 +01:00
# 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
}