浏览代码

Meta: Skip shellcheck for Ports in pre-commit hook

Shellcheck barfs on many of the patterns we use in port scripts, the
check is already disabled when we run the script in CI, so we might as
well disable the check for pre-commit as well.
Brian Gianforcaro 3 年之前
父节点
当前提交
4b2bbe6a7e
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      Meta/lint-shell-scripts.sh

+ 5 - 0
Meta/lint-shell-scripts.sh

@@ -17,6 +17,11 @@ if [ "$#" -eq "0" ]; then
 else
     files=()
     for file in "$@"; do
+        # Skip ports, like we in the CI case above.
+        if [[ "${file}" =~ "Ports" ]]; then
+           continue
+        fi
+
         if [[ "${file}" == *".sh" && "${file}" != "Base/root/generate_manpages.sh" ]]; then
             files+=("${file}")
         fi