prysm-pulse/scripts/check-todo.sh
Zach Zundel f3774edeb1 Pending TODO Script Checker in Codebase (#540)
* TODO script

* Add todo to Travis

* Remove blame from todo check

* Print failing todo comments

* Fail on failure

* Fix todo checker

* Don't install godeps

* *actually* don't install godeps
2018-09-22 18:07:03 -04:00

11 lines
288 B
Bash
Executable File

#!/bin/bash
# Continuous integration script to check that TODOs are in the correct format
OUTPUT="$(grep -PrinH '(?<!context\.)todo(?!\(#{0,1}\d+\))' --include \*.go *)";
if [ "$OUTPUT" != "" ] ;
then
echo "Invalid TODOs found. Failing." >&2;
echo "$OUTPUT" >&2;
exit 1;
fi