aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2022-01-18 15:21:48 -0300
committerEuAndreh <eu@euandre.org>2022-01-18 17:46:26 -0300
commit1c4365bf77052ed9946b1aa0dba8e3b8ed61540e (patch)
tree6de660a0ca6c5c911bc122bdf27b7bf56b3d43e5
parentaux/workflow/assert-todos.sh: Emit warnings to STDERR instead of STDOUT (diff)
downloadtd-1c4365bf77052ed9946b1aa0dba8e3b8ed61540e.tar.gz
td-1c4365bf77052ed9946b1aa0dba8e3b8ed61540e.tar.xz
aux/workflow/assert-todos.sh: Receive files to be checked as first argument
-rwxr-xr-xaux/workflow/assert-todos.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/aux/workflow/assert-todos.sh b/aux/workflow/assert-todos.sh
index 991fefa..11db142 100755
--- a/aux/workflow/assert-todos.sh
+++ b/aux/workflow/assert-todos.sh
@@ -1,8 +1,12 @@
#!/bin/sh
set -eu
-if [ -e .git ] && git grep FIXME | grep -v '^TODOs.md' |
- grep -v '^aux/workflow/assert-todos.sh'; then
+# shellcheck disable=2086
+if [ -e .git ] &&
+ git grep FIXME ${1:-} |
+ grep -v '^TODOs.md:' |
+ grep -v '^aux/workflow/assert-todos.sh:'
+then
echo "Found dangling FIXME markers on the project." >&2
echo "You should write them down properly on TODOs.md." >&2
exit 1