diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index 9bbd3400..da51942a 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -61,31 +61,11 @@ jobs: tr '\0' '\n' < "$files_list" xargs -0 -r sh -c ' - is_functestlib() { - lint_file_path="$1" - - case "$lint_file_path" in - ./Runner/utils/functestlib.sh|Runner/utils/functestlib.sh) - return 0 - ;; - esac - - return 1 - } - run_shellcheck() { lint_file_path="$1" - base_excludes="SC1091,SC2230,SC3043" - lint_excludes="$base_excludes" - - if is_functestlib "$lint_file_path"; then - lint_excludes="${base_excludes},SC2317" - echo "ShellCheck functestlib mode: $lint_file_path" - else - echo "ShellCheck strict mode: $lint_file_path" - fi - shellcheck -s sh -e "$lint_excludes" -- "$lint_file_path" + echo "ShellCheck strict mode: $lint_file_path" + shellcheck -s sh -e SC1091,SC2230,SC3043 -- "$lint_file_path" } rc=0 @@ -116,31 +96,11 @@ jobs: fi xargs -0 -r sh -c ' - is_functestlib() { - lint_file_path="$1" - - case "$lint_file_path" in - ./Runner/utils/functestlib.sh|Runner/utils/functestlib.sh) - return 0 - ;; - esac - - return 1 - } - run_shellcheck() { lint_file_path="$1" - base_excludes="SC1091,SC2230,SC3043" - lint_excludes="$base_excludes" - - if is_functestlib "$lint_file_path"; then - lint_excludes="${base_excludes},SC2317" - echo "ShellCheck functestlib mode: $lint_file_path" - else - echo "ShellCheck strict mode: $lint_file_path" - fi - shellcheck -s sh -e "$lint_excludes" -- "$lint_file_path" + echo "ShellCheck strict mode: $lint_file_path" + shellcheck -s sh -e SC1091,SC2230,SC3043 -- "$lint_file_path" } rc=0 @@ -153,3 +113,4 @@ jobs: exit "$rc" ' sh < "$files_list" +