Skip to content

Commit

Permalink
xlint: check make_check comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocimier committed Oct 15, 2021
1 parent 59eacf3 commit 2c9348e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions xlint
Expand Up @@ -31,6 +31,13 @@ exists_once() {
done
}

explain_make_check() {
awk "-vtemplate=$template" -vOFS=: '
/make_check=[^#]*$/ && !match(prev, /^[:blank:]*#/) {print(template, FNR, " explain why tests do fail")}
{prev=$0}
' $template
}

variables_order() {
local curr_index max_index max_index_line variables_end message line
max_index=0
Expand Down Expand Up @@ -445,6 +452,7 @@ for argument; do
variables_order
header
file_end
explain_make_check
else
echo no such template "$argument" 1>&2
fi | sort -t: -n -k2 | grep . && ret=1
Expand Down

0 comments on commit 2c9348e

Please sign in to comment.