mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
17 lines
415 B
Bash
Executable File
17 lines
415 B
Bash
Executable File
#!/bin/bash
|
|
|
|
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|
|
|
python -c 'import flake8; import flake8_import_order' 2>/dev/null
|
|
if [[ $? != 0 ]]; then
|
|
echo "Missing modules flake8 or flake8-import-order. Please be sure to install these python packages before linting."
|
|
exit 1
|
|
fi
|
|
|
|
cd "$SCRIPT_DIR/.."
|
|
if [[ $? != 0 ]]; then
|
|
echo "Could not change directory to '$SCRIPT_DIR/..'."
|
|
exit 1
|
|
fi
|
|
flake8 $@
|