Simple test for defer.setDebugging(True) calls

This commit is contained in:
meejah 2016-08-19 11:37:15 -06:00
parent 9979a7dca3
commit d641aef2a3
2 changed files with 15 additions and 1 deletions

View File

@ -66,7 +66,12 @@ smoketest:
.PHONY: code-checks .PHONY: code-checks
#code-checks: build version-and-path check-interfaces check-miscaptures -find-trailing-spaces -check-umids pyflakes #code-checks: build version-and-path check-interfaces check-miscaptures -find-trailing-spaces -check-umids pyflakes
code-checks: check-miscaptures -find-trailing-spaces -check-umids pyflakes code-checks: check-debugging check-miscaptures -find-trailing-spaces -check-umids pyflakes
.PHONY: check-debugging
check-debugging:
misc/coding_tools/check-debugging.sh
@echo
.PHONY: check-miscaptures .PHONY: check-miscaptures
check-miscaptures: check-miscaptures:

View File

@ -0,0 +1,9 @@
#!/bin/bash
OUTPUT=$(grep -R '\.setDebugging(True)' src/allmydata)
if [[ -n $OUTPUT ]] ; then
echo "Do not use defer.setDebugging(True) in production:"
echo $OUTPUT
exit 1
fi