From f880f3861e00192a41a1d46027c93b91175a032c Mon Sep 17 00:00:00 2001 From: Vladimir Ischenko Date: Mon, 20 Jan 2025 11:31:56 +0300 Subject: [PATCH] Test lint check OCI packages --- .github/workflows/ci-oci-install.yml | 3 ++- tests/lint/sc_ignore | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-oci-install.yml b/.github/workflows/ci-oci-install.yml index b6a8cb28f5..217b7d941a 100644 --- a/.github/workflows/ci-oci-install.yml +++ b/.github/workflows/ci-oci-install.yml @@ -70,7 +70,8 @@ jobs: sudo apt-get install -y shellcheck find install/OneClickInstall tests -type f -name "*.sh" ! -path "install/OneClickInstall/install-Docker.sh" \ | xargs shellcheck --exclude="$(awk '!/^#|^$/ {print $1}' /tests/lint/sc_ignore | paste -sd ",")" --severity=warning | tee sc_output - awk 'BEGIN {w=0} /^[^#]SC[0-9]+/ {w++} END {if (w > 0) printf "::warning ::ShellCheck detected %d issues\n", w}' sc_output + awk '/\(warning\):/ {w++} /\(error\):/ {e++} END {if (w+e) printf "::warning ::ShellCheck detected %d warnings and %d errors\n", w+0, e+0}' sc_output + awk '!/^#|^$/ {print $1}' /tests/lint/sc_ignore - name: Determine affected distributions id: determine-distros diff --git a/tests/lint/sc_ignore b/tests/lint/sc_ignore index 193ec95ee6..e17e7d5f43 100644 --- a/tests/lint/sc_ignore +++ b/tests/lint/sc_ignore @@ -11,4 +11,4 @@ SC2046 # Example: ${package_manager} -y install $([ "$DIST" != "fedora" ] && ech SC2154 # Example: echo "${product}" # Declare and assign separately to avoid masking return values. Combined for simplicity. -#SC2155 # Example: local AVAILABLE_DISK_SPACE=$(df -m / | tail -1 | awk '{ print $4 }') +SC2155 # Example: local AVAILABLE_DISK_SPACE=$(df -m / | tail -1 | awk '{ print $4 }')