build: add shell script linter workflow
Implement workflow to to run static analysis and linting of all shell scripts by using shfmt and shellcheck. Fixes: #5396 Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
This commit is contained in:
parent
2b2d00653c
commit
af4a193b43
1 changed files with 20 additions and 0 deletions
20
.github/workflows/shlint.yaml
vendored
Normal file
20
.github/workflows/shlint.yaml
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
name: Shell scripts check
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
sh-checker:
|
||||
name: Check shell scripts
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Run the shell script checkers
|
||||
uses: luizm/action-sh-checker@master
|
||||
env:
|
||||
SHFMT_OPTS: -i 4 -d
|
||||
SHELLCHECK_OPTS: -x --source-path scripts
|
||||
Loading…
Add table
Add a link
Reference in a new issue