mirror of https://github.com/helm/helm
This commit adds GitHub Actions workflow for ShellCheck to lint bash scripts: - Created .github/workflows/shellcheck.yml - Runs on all pull requests and pushes - Uses ubuntu-latest where ShellCheck is pre-installed - Finds and lints all *.sh files in the repository Additionally, this commit fixes ShellCheck warnings in existing scripts: - scripts/release-notes.sh: Fixed unquoted variables, replaced expr with 0 - scripts/util.sh: Replaced backticks with $(...), fixed trap command quoting - scripts/validate-license.sh: Used mapfile for array assignment instead of command substitution All bash scripts now pass ShellCheck validation. Fixes: #31689 Signed-off-by: Adesh Deshmukh <adeshkd123@gmail.com>pull/31975/head
parent
b3927b3900
commit
3de215d292
@ -0,0 +1,20 @@
|
|||||||
|
name: ShellCheck
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
shellcheck:
|
||||||
|
name: ShellCheck
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pin@v6.0.2
|
||||||
|
- name: Run ShellCheck
|
||||||
|
run: |
|
||||||
|
shellcheck --version
|
||||||
|
find . -type f -name "*.sh" -not -path "./vendor/*" -not -path "./.git/*" | xargs shellcheck
|
||||||
Loading…
Reference in new issue