From c3265231ac8a370c8fb3efca00f1c1801aac00dd Mon Sep 17 00:00:00 2001 From: Marcio Mazza Date: Wed, 25 Oct 2017 11:20:40 -0200 Subject: [PATCH] Ignora ipython_log ao conferir breakpoints esquecidos --- check_qa.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/check_qa.sh b/check_qa.sh index 607bb52bd..47f2b56d3 100755 --- a/check_qa.sh +++ b/check_qa.sh @@ -1,17 +1,17 @@ #!/bin/bash -# Check if there's some debug breakpoint in codebase +# Verifica se um breakpoint foi esquecido no código me=`basename "$0"` -stmts=`grep --exclude=$me -r -l "ipdb.set_trace()" * | wc -l` -if [ $stmts != '0' ] +busca=`grep --color=auto --exclude=$me --exclude=ipython_log.py* -r -l "pdb.set_trace()" .` + +if [ ! -z "$busca" ] then - echo "==================================================================" - echo "ERROR: ipdb.set_trace() call in codebase! Remove, please." - grep --exclude=$me -r -n "ipdb.set_trace()" * - echo "==================================================================" + echo "============================================================================" + echo "ERROR: pdb.set_trace() encontrado nos seguintes arquivos. Remova, por favor." + echo "$busca" + echo "============================================================================" fi -# QA checks: run this before every commit -./manage.py check -flake8 --exclude='ipython_log.py*,migrations,templates' . -isort --recursive --check-only --skip='migrations' --skip='templates' --skip='ipython_log.py' . +# ./manage.py check +# flake8 --exclude='ipython_log.py*,migrations,templates' . +# isort --recursive --check-only --skip='migrations' --skip='templates' --skip='ipython_log.py' .