]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
ci(lint): add shell linter - Differential ShellCheck
authorJan Macku <jamacku@redhat.com>
Mon, 12 Sep 2022 08:15:43 +0000 (10:15 +0200)
committerSerge Hallyn <serge@hallyn.com>
Tue, 13 Sep 2022 00:29:24 +0000 (19:29 -0500)
It performs differential ShellCheck scans and report results directly in pull request.

documentation: https://github.com/redhat-plumbers-in-action/differential-shellcheck

Signed-off-by: Jan Macku <jamacku@redhat.com>
.github/workflows/static-code-analysis.yml

index 64dbe388057f1270176849b6d4b44c40b4035ee4..1c3a65b5a4bfb6d445012806e1b26748b8c10078 100644 (file)
@@ -36,3 +36,25 @@ jobs:
 
     - name: Perform CodeQL Analysis
       uses: github/codeql-action/analyze@v2
+
+  differential-shellcheck:
+    if: github.event_name == 'pull_request'
+    runs-on: ubuntu-latest
+
+    permissions:
+      contents: read
+      security-events: write
+      pull-requests: write
+
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v3
+        with:
+          fetch-depth: 0
+
+      # Doc: https://github.com/redhat-plumbers-in-action/differential-shellcheck#usage
+      - name: Differential ShellCheck
+        uses: redhat-plumbers-in-action/differential-shellcheck@v3
+        with:
+          severity: warning
+          token: ${{ secrets.GITHUB_TOKEN }}