aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Belle-Isle <drumsetmonkey@gmail.com>2019-09-13 02:03:09 -0400
committerAndy Belle-Isle <drumsetmonkey@gmail.com>2019-09-13 02:03:09 -0400
commit4c4f7b9a2eae1694f1628559cb7baca88a7c29f1 (patch)
tree6c6a810e58d58165d424d32e12d7f90a4b546704
parent54cf2f1f9a044a0d0def92c1904b24d3c3647d36 (diff)
Readded todo script from gamedev1 that can be used to find all TODOs placed in our code
-rw-r--r--.gitignore2
-rwxr-xr-xtodo.sh19
2 files changed, 20 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 65892b3..3435d00 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,4 +4,4 @@ out
.*.swo
*.o
*.json
-
+TODOS
diff --git a/todo.sh b/todo.sh
new file mode 100755
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."