summaryrefslogtreecommitdiffstats
path: root/run_checks.sh
diff options
context:
space:
mode:
Diffstat (limited to 'run_checks.sh')
-rwxr-xr-xrun_checks.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/run_checks.sh b/run_checks.sh
index 770f443..b6e559d 100755
--- a/run_checks.sh
+++ b/run_checks.sh
@@ -1,6 +1,8 @@
#!/bin/bash -e
-python -m autoflake -i -r \
+[[ -z "${GITHUB_ACTIONS}" ]] && RETURN_ERROR_CODE='' || RETURN_ERROR_CODE='--check'
+
+python -m autoflake -i -r ${RETURN_ERROR_CODE} \
--expand-star-imports \
--remove-all-unused-imports \
--ignore-init-module-imports \
@@ -8,5 +10,5 @@ python -m autoflake -i -r \
--remove-unused-variables \
sqlglot/ tests/
python -m isort --profile black sqlglot/ tests/
-python -m black --line-length 120 sqlglot/ tests/
+python -m black ${RETURN_ERROR_CODE} --line-length 120 sqlglot/ tests/
python -m unittest