diff options
author | EuAndreh <eu@euandre.org> | 2021-01-23 20:07:54 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-01-23 20:07:54 -0300 |
commit | b1ab113bd23377e14e175c434bec9366d7fb4ca6 (patch) | |
tree | 06a00255ad8eb3cd89d4bc634356203392a66737 /scripts/assert-todos.sh | |
parent | assert-spelling.sh: Exclude TODOs.html from spellchecking (diff) | |
download | euandre.org-b1ab113bd23377e14e175c434bec9366d7fb4ca6.tar.gz euandre.org-b1ab113bd23377e14e175c434bec9366d7fb4ca6.tar.xz |
Use build-aux/assert-todos.sh over scripts/assert-todos.sh
Diffstat (limited to '')
-rwxr-xr-x | scripts/assert-todos.sh | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/scripts/assert-todos.sh b/scripts/assert-todos.sh deleted file mode 100755 index ac72057..0000000 --- a/scripts/assert-todos.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -set -eu - -if git grep FIXME | grep -Ev '^(vendor/|scripts/assert-todos.sh|locale/)'; then - echo "Found dangling FIXME markers on the project." - echo "You should write them down properly on TODOs.org." - exit 1 -fi - -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 sed "${todo}q;d" TODOs.org | grep -qE '^\*\* (CANCELLED|DONE)'; then - ID_OFFSET=3 - else - ID_OFFSET=2 - fi - line_n="$((todo+ID_OFFSET))" - ID_LINE="$(sed "${line_n}q;d" TODOs.org)" - if echo "$ID_LINE" | grep -q '^:CUSTOM_ID: .*$'; then - ID="$(echo "$ID_LINE" | awk '{print $2}')" - if echo "$KNOWN_IDS" | grep -q "$ID"; then - echo "Duplicated ID: $ID" - has_error=1 - else - if [ -z "$KNOWN_IDS" ]; then - KNOWN_IDS="$ID" - else - KNOWN_IDS="$KNOWN_IDS:$ID" - fi - fi - else - echo "Missing ID for TODO in line $line_n" - has_error=1 - fi -done - -exit "$has_error" |