Skip to content

Commit

Permalink
add shell linter shellcheck
Browse files Browse the repository at this point in the history
This adds a GitHub action which runs a shell linter on all the .sh files.
ludeeus/action-shellcheck is just an action which relies on
https://github.com/koalaman/shellcheck which is a well known linter.
Fix only serious errors by now, we'll take care of warnings later.

    ~/src/libbpf-ci$ find -type f -name '*.sh' |xargs shellcheck -S error
    ~/src/libbpf-ci$ echo $?
    0

Signed-off-by: Matteo Croce <[email protected]>
  • Loading branch information
teknoraver authored and danielocfb committed Oct 27, 2022
1 parent 4f86562 commit 4dfc73d
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "lint"

on:
pull_request:
push:
branches:
- master

jobs:
shellcheck:
name: ShellCheck
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
env:
SHELLCHECK_OPTS: -S error

0 comments on commit 4dfc73d

Please sign in to comment.