From 0d8d5c5389f3da8c6aae672fc989f283e71dd1fc Mon Sep 17 00:00:00 2001 From: Harshvir Potpose Date: Mon, 17 Feb 2025 17:48:12 +0530 Subject: [PATCH] add pre-commit Signed-off-by: Harshvir Potpose --- .pre-commit-config.yaml | 22 ++++++++++++++++++++++ contrib/spark/test.sh | 2 -- tests/gh-actions/install_knative-cni.sh | 5 ++--- tests/gh-actions/install_knative.sh | 5 ++--- 4 files changed, 26 insertions(+), 8 deletions(-) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..5157e5fe4 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,22 @@ +repos: + - repo: https://github.com/psf/black + rev: 24.2.0 + hooks: + - id: black + files: ^(common|example)/.*\.py$ + exclude: .*upstream.* + + - repo: https://github.com/adrienverge/yamllint + rev: v1.35.1 + hooks: + - id: yamllint + files: ^(common|example|hack|tests|\.github)/.*\.ya?ml$ + exclude: .*upstream.* + args: [--config-file=.yamllint.yaml] + + - repo: https://github.com/shellcheck-py/shellcheck-py + rev: v0.9.0.6 + hooks: + - id: shellcheck + files: ^.*\.sh$ + exclude: (^apps/.*|.*upstream.*) \ No newline at end of file diff --git a/contrib/spark/test.sh b/contrib/spark/test.sh index 707b12ec5..8e1e1f235 100755 --- a/contrib/spark/test.sh +++ b/contrib/spark/test.sh @@ -4,8 +4,6 @@ set -euxo NAMESPACE=$1 TIMEOUT=120 # timeout in seconds -SLEEP_INTERVAL=30 # interval between checks in seconds -SPARK_VERSION=3.5.2 start_time=$(date +%s) for ((i=0; i