From 635fb5e9c11769d935f75c7eeb9e91c11e4f23bc Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Mon, 16 Nov 2020 20:01:43 -0300 Subject: Fix tests.sh --- scripts/assert-todos.sh | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'scripts/assert-todos.sh') diff --git a/scripts/assert-todos.sh b/scripts/assert-todos.sh index c3139d1..7c32524 100755 --- a/scripts/assert-todos.sh +++ b/scripts/assert-todos.sh @@ -9,35 +9,3 @@ if grep -R FIXME $(git ls-files) | grep -v '^TODOs.org' | grep -v '^.git/' | gre echo "You should write them down properly on TODOs.org." exit 1 fi - -contains-element() { - local e match="$1" - shift - for e; do [[ "$e" == "$match" ]] && return 0; done - return 1 -} - -KNOWN_IDS=() -has_error=0 -# shellcheck disable=2013 -for todo in $(sed -e '/^\* Tasks$/,/^\* Improvements$/!d' TODOs.org | grep -nE '^\*\* .*$' | cut -d: -f1); do - if grep -E '^\*\* (CANCELLED|DONE)' <(sed "${todo}q;d" TODOs.org) > /dev/null; then - ID_OFFSET=3 - else - ID_OFFSET=2 - fi - ID="$(sed "$((todo+ID_OFFSET))q;d" TODOs.org)" - if grep '^:CUSTOM_ID: .*$' <(echo "$ID") > /dev/null; then - if contains-element "$ID" "${KNOWN_IDS[@]}"; then - echo "Duplicated ID: $ID" - has_error=1 - else - KNOWN_IDS+=("$ID") - fi - else - echo "Missing ID for TODO in line $todo" - has_error=1 - fi -done - -exit "$has_error" -- cgit v1.2.3