mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-07 19:55:09 +02:00
Switch to Differential ShellCheck
Signed-off-by: Christian König <github@yubiuser.dev>
This commit is contained in:
parent
23fc53c618
commit
135b0cce14
21
.github/workflows/test.yml
vendored
21
.github/workflows/test.yml
vendored
@ -16,9 +16,13 @@ jobs:
|
||||
smoke-tests:
|
||||
if: github.event.pull_request.draft == false
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
security-events: write # required by Differential ShellCheck
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.2
|
||||
with:
|
||||
fetch-depth: 0 # Differential ShellCheck requires full git history
|
||||
|
||||
- name: Check scripts in repository are executable
|
||||
run: |
|
||||
@ -28,14 +32,17 @@ jobs:
|
||||
# If FAIL is 1 then we fail.
|
||||
[[ $FAIL == 1 ]] && exit 1 || echo "Scripts are executable!"
|
||||
|
||||
- name: Run shellcheck
|
||||
uses: ludeeus/action-shellcheck@master
|
||||
- name: Differential ShellCheck
|
||||
uses: redhat-plumbers-in-action/differential-shellcheck@v5
|
||||
with:
|
||||
check_together: 'yes'
|
||||
format: tty
|
||||
severity: warning
|
||||
env:
|
||||
SHELLCHECK_OPTS: -x # Enable shellcheck -x option (follow external sources)
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- if: ${{ runner.debug == '1' && !cancelled() }}
|
||||
name: Upload artifact with ShellCheck defects in SARIF format
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Differential ShellCheck SARIF
|
||||
path: ${{ steps.ShellCheck.outputs.sarif }}
|
||||
|
||||
- name: Spell-Checking
|
||||
uses: codespell-project/actions-codespell@master
|
||||
|
Loading…
x
Reference in New Issue
Block a user