Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

lint.sh 460B

123456789101112131415161718
  1. #/usr/bin/env bash
  2. ERRORFILE="violations.txt"
  3. THRESHOLD=1050
  4. IGNORE="W292,E202"
  5. flake8 --ignore=$IGNORE oscar | perl -ple "s/: /: [E] /" | grep -v migrations > $ERRORFILE
  6. # Check that the number of violations is acceptable
  7. NUMERRORS=`cat $ERRORFILE | wc -l`
  8. if [ $NUMERRORS -gt $THRESHOLD ]
  9. then
  10. echo
  11. echo "Too many flake8 errors - maximum allowed is $THRESHOLD, found $NUMERRORS"
  12. echo
  13. echo "To fix, run 'make lint' and examine $ERRORFILE"
  14. exit 1
  15. fi