1
0

lint.sh 402 B

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