Skip to content
This repository
tree: ae13037e48
Fetching contributors…

Cannot retrieve contributors at this time

executable file 18 lines (15 sloc) 0.46 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#/usr/bin/env bash

ERRORFILE="violations.txt"
THRESHOLD=1050
IGNORE="W292,E202"

flake8 --ignore=$IGNORE oscar | perl -ple "s/: /: [E] /" | grep -v migrations > $ERRORFILE

# Check that the number of violations is acceptable
NUMERRORS=`cat $ERRORFILE | wc -l`
if [ $NUMERRORS -gt $THRESHOLD ]
then
echo
echo "Too many flake8 errors - maximum allowed is $THRESHOLD, found $NUMERRORS"
echo
echo "To fix, run 'make lint' and examine $ERRORFILE"
exit 1
fi
Something went wrong with that request. Please try again.