Skip to content

Instantly share code, notes, and snippets.

@jbszczepaniak
Created February 15, 2018 11:28
Show Gist options
  • Save jbszczepaniak/f0a0d7d4287c4c35bd1931ee89eb0b34 to your computer and use it in GitHub Desktop.
Save jbszczepaniak/f0a0d7d4287c4c35bd1931ee89eb0b34 to your computer and use it in GitHub Desktop.
Do not allow to commit prints and console.logs
count=`grep -iR --include \*.ts 'console.log(' src/* | wc -l | awk '{print $1}'`
if [[ "$count" != 0 ]]; then
echo "ERROR: Remove any config.log() statements in typescript sources"
exit 1
fi
count=`grep -iR --include \*.py 'print(' src/* | wc -l | awk '{print $1}'`
if [[ "$count" != 0 ]]; then
echo "ERROR: Remove any print() statements in python sources"
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment