]> code.bitgloo.com Git - clyne/gamedev2.git/commitdiff
Readded todo script from gamedev1 that can be used to find all TODOs placed in our...
authorAndy Belle-Isle <drumsetmonkey@gmail.com>
Fri, 13 Sep 2019 06:03:09 +0000 (02:03 -0400)
committerAndy Belle-Isle <drumsetmonkey@gmail.com>
Fri, 13 Sep 2019 06:03:09 +0000 (02:03 -0400)
.gitignore
todo.sh [new file with mode: 0755]

index 65892b372da2fdcfabeef7ec59f651187efe6ffd..3435d001c2313e49acb00dafe7a6a95ca7e70b33 100644 (file)
@@ -4,4 +4,4 @@ out
 .*.swo
 *.o
 *.json
-
+TODOS
diff --git a/todo.sh b/todo.sh
new file mode 100755 (executable)
index 0000000..fa43de4
--- /dev/null
+++ b/todo.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+#
+# Searches for all TODOs and tosses them in a file.
+#
+TODO_COUNT=0
+rm -f TODOS
+touch TODOS
+
+for file in src/*.cpp
+do
+       echo "########################################" >> TODOS
+       echo $file >> TODOS
+       echo "========================================" >> TODOS
+       grep -n -B 5 -A 5 "TODO" $file | sed s/--/========================================/g >> TODOS
+       TODO_COUNT=$((TODO_COUNT+$(grep -c "TODO" $file)))
+done
+
+echo "Found" $TODO_COUNT "TODOs."