ci(shell-check): 修改配置只检查sh后缀文件

This commit is contained in:
YuleBest committed 2026-02-04 04:31:07 +08:00
1 parent a7e841c83b
commit afddddd11a
1 file changed
+5 -8
+5 -8
View File
@@ -15,11 +15,8 @@ jobs:
uses: actions/checkout@v4
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
with:
# 只检查以 .sh 结尾的文件
check_all_files_with_extensions: true
additional_extensions: 'sh'
severity: warning
env:
SHELLCHECK_OPTS: -x
run: |
# 寻找当前目录下所有以 .sh 结尾的文件
# 并通过 xargs 传给 shellcheck
# -r 参数防止没有文件时报错,-x 支持联动检查
find . -name "*.sh" -print0 | xargs -0 shellcheck -x --severity=warning