From 81643ca1677593291d2024ace4f25b2885c888d4 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sun, 6 Jun 2021 09:30:19 -0300 Subject: aux/: Use tabs over spaces for .sh files --- aux/workflow/assert-todos.sh | 74 ++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 37 deletions(-) (limited to 'aux/workflow/assert-todos.sh') diff --git a/aux/workflow/assert-todos.sh b/aux/workflow/assert-todos.sh index cd7b611..ca73b7f 100755 --- a/aux/workflow/assert-todos.sh +++ b/aux/workflow/assert-todos.sh @@ -2,56 +2,56 @@ set -eu if git grep FIXME | grep -v '^TODOs.md' | grep -v '^aux/workflow/assert-todos.sh'; then - echo "Found dangling FIXME markers on the project." - echo "You should write them down properly on TODOs.md." - exit 1 + echo "Found dangling FIXME markers on the project." + echo "You should write them down properly on TODOs.md." + exit 1 fi awk -F'{#' ' BEGIN { - exitstatus = 0 - h2flag = 0 - h2status = "" - prevline = "" - idx = 0 - delete ids[0] + exitstatus = 0 + h2flag = 0 + h2status = "" + prevline = "" + idx = 0 + delete ids[0] } h2flag == 1 { - split($0, l, " ") - timelinestatus = l[2] - if (h2status != timelinestatus) { - print "h2/timeline status mismatch for line " NR-1 - print prevline - print $0 - exitstatus = 1 - } - h2status = "" - h2flag = 0 + split($0, l, " ") + timelinestatus = l[2] + if (h2status != timelinestatus) { + print "h2/timeline status mismatch for line " NR-1 + print prevline + print $0 + exitstatus = 1 + } + h2status = "" + h2flag = 0 } /^## (TODO|DOING|WAITING|MEETING|INACTIVE|NEXT|CANCELLED|DONE)/ { - if (match($0, / \{#.*?\}$/) == 0) { - print "Missing ID for line " NR ":\n" $0 - exitstatus = 1 - } - id_with_prefix = substr($2, 0, length($2) - 1) - match(id_with_prefix, /^\w+-/) - id = substr(id_with_prefix, RLENGTH + 1) - if (id in arr) { - print "Duplicate ID: " id - exitstatus = 1 - } else { - arr[id] = 1 - } + if (match($0, / \{#.*?\}$/) == 0) { + print "Missing ID for line " NR ":\n" $0 + exitstatus = 1 + } + id_with_prefix = substr($2, 0, length($2) - 1) + match(id_with_prefix, /^\w+-/) + id = substr(id_with_prefix, RLENGTH + 1) + if (id in arr) { + print "Duplicate ID: " id + exitstatus = 1 + } else { + arr[id] = 1 + } - split($0, l, " ") - h2status = l[2] - h2flag = 1 - prevline = $0 + split($0, l, " ") + h2status = l[2] + h2flag = 1 + prevline = $0 } /^# Scratch$/ { - exit exitstatus + exit exitstatus } ' TODOs.md -- cgit v1.2.3