summaryrefslogtreecommitdiffstats
path: root/run_checks.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-09-30 05:07:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-09-30 05:07:13 +0000
commit276f5723c8ab7e0b2938693db546dbd30be3f01a (patch)
treee6294c63de34a03e373245ec4cb1efbca1edfe61 /run_checks.sh
parentAdding upstream version 6.2.1. (diff)
downloadsqlglot-276f5723c8ab7e0b2938693db546dbd30be3f01a.tar.xz
sqlglot-276f5723c8ab7e0b2938693db546dbd30be3f01a.zip
Adding upstream version 6.2.6.upstream/6.2.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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