You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

lint.sh 579B

12345678910111213141516171819
  1. #/usr/bin/env bash
  2. #
  3. # Run static analysis of the codebase
  4. #
  5. # This is run on Travis to ensure that pull requests conform to the project coding standards.
  6. # Run flake8 and convert the output into a format that the "violations" plugin
  7. # for Jenkins/Hudson can understand. Ignore warnings from migrations we we don't
  8. # really care about those.
  9. ERRORFILE="violations.txt"
  10. flake8 oscar | perl -ple "s/: /: [E] /" > $ERRORFILE
  11. # Check that the number of violations is acceptable
  12. NUMERRORS=`cat $ERRORFILE | wc -l`
  13. if [ $NUMERRORS -gt 0 ]
  14. then
  15. cat violations.txt
  16. exit 1
  17. fi