Skip to content

Commit

Permalink
Add shellcheck github-action and .shellcheckrc
Browse files Browse the repository at this point in the history
  • Loading branch information
Salamandar committed Dec 16, 2024
1 parent d1a4ab7 commit 8323fbf
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Run Shellcheck on push and PR

on:
push:
pull_request:

jobs:
shellcheck:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run ShellCheck
uses: salamandar/action-shellcheck@master
env:
SHELLCHECK_OPTS: -x -e SC2155
with:
additional_files: |
bin/yunoprompt
debian/postinst
debian/postrm
debian/prerm
hooks/*/*
tests
helpers/helpers.v2.1.d/*
ignore_paths:
tests/test_helpers.v2.d
helpers/vendor
src/vendor
11 changes: 11 additions & 0 deletions .shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
external-sources=true
source-path=SCRIPTDIR

# Declare and assign separately
disable=SC2155

# In case cd / pushd / popd fails
disable=SC2164

# Useless cat when sed/grep
disable=SC2002

0 comments on commit 8323fbf

Please sign in to comment.