1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-07-01 11:01:40 +03:00

ci: add shellcheck job and script

Add FIXME for OS/400 scripts.

Cherry-picked from #1358
This commit is contained in:
Viktor Szakats
2024-04-08 13:49:23 +00:00
parent a2ac8c55be
commit d88b9bcdaf
2 changed files with 20 additions and 0 deletions

View File

@ -26,6 +26,14 @@ jobs:
- name: 'checksrc'
run: ./ci/checksrc.sh
shellcheck:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: 'shellcheck'
run: ./ci/shellcheck.sh
spellcheck:
runs-on: ubuntu-latest
steps:

12
ci/shellcheck.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
# Copyright (C) Viktor Szakats
#
# SPDX-License-Identifier: curl
# FIXME: os400/* scripts
shellcheck --version
# shellcheck disable=SC2046
shellcheck --exclude=1091 \
--enable=avoid-nullary-conditions,deprecate-which \
$(grep -l -E '^#!(/usr/bin/env bash|/bin/sh|/bin/bash)' $(git ls-files | grep -v -F 'os400/'))