lint.sh 394 B

123456789101112131415161718192021
  1. #!/bin/sh
  2. #
  3. # Runs linting scripts over the local Synapse checkout
  4. # isort - sorts import statements
  5. # flake8 - lints and finds mistakes
  6. # black - opinionated code formatter
  7. set -e
  8. if [ $# -ge 1 ]
  9. then
  10. files=$*
  11. else
  12. files="synapse tests scripts-dev scripts"
  13. fi
  14. echo "Linting these locations: $files"
  15. isort -y -rc $files
  16. flake8 $files
  17. python3 -m black $files
  18. ./scripts-dev/config-lint.sh