source/tools/fmt.sh
Reid 'arrdem' McKenzie 21613e9ea5 [NO TESTS] WIP
2021-09-25 00:43:50 -06:00

19 lines
439 B
Bash
Executable file

#!/usr/bin/env bash
set -euox pipefail
cd "$(git rev-parse --show-toplevel)"
bazel build //tools/... //projects/reqman
DIRS=(projects tools)
function brl() {
bin="$1"
shift
bazel run "//${bin}" -- "$@"
return "$?"
}
brl tools/autoflake --remove-all-unused-imports -ir "${DIRS[@]}"
brl tools/isort "${DIRS[@]}"
brl tools/unify --quote '"' -ir "${DIRS[@]}"
brl projects/reqman clean tools/python/requirements.txt