Added check to make sure that logging is used over print
This commit is contained in:
11
cicd/no_print.sh
Executable file
11
cicd/no_print.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#! /bin/bash
|
||||
|
||||
grep -Inre "print(" sublime | while read line; do
|
||||
if [[ $line =~ "# allowprint" ]]; then
|
||||
continue
|
||||
fi
|
||||
echo "Found instance of print statement:"
|
||||
echo $line
|
||||
echo "Use logging instead or add '# allowprint' to the end of the line."
|
||||
exit 1
|
||||
done
|
Reference in New Issue
Block a user