Skip to content

Commit

Permalink
Test lint check OCI packages
Browse files Browse the repository at this point in the history
  • Loading branch information
isboston committed Jan 20, 2025
1 parent b0df682 commit f880f38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci-oci-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/lint/sc_ignore
Original file line number Diff line number Diff line change
Expand Up @@ -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 }')

0 comments on commit f880f38

Please sign in to comment.