diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rwxr-xr-x | todo.sh | 19 |
2 files changed, 20 insertions, 1 deletions
@@ -4,4 +4,4 @@ out .*.swo *.o *.json - +TODOS @@ -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." |