]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
ci: introduce Super-Linter for shell scripts 20884/head
authorFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 29 Sep 2021 20:08:51 +0000 (22:08 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 30 Sep 2021 10:27:08 +0000 (12:27 +0200)
See: https://github.com/marketplace/actions/super-linter

.github/workflows/linter.yml [new file with mode: 0644]

diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml
new file mode 100644 (file)
index 0000000..115f5c7
--- /dev/null
@@ -0,0 +1,38 @@
+---
+# https://github.com/marketplace/actions/super-linter
+
+name: Lint Code Base
+
+on:
+  pull_request:
+    branches:
+      - main
+
+jobs:
+  build:
+    name: Lint Code Base
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Repo checkout
+        uses: actions/checkout@v2
+        with:
+          # We need a full repo clone
+          fetch-depth: 0
+
+      - name: Lint Code Base
+        uses: github/super-linter@v3
+        env:
+          DEFAULT_BRANCH: main
+          # Excludes:
+          #   - man/.* - all snippets in man pages (false positives due to
+          #              missing shebangs)
+          #   - kernel-install/.* - false-positives for dropins (and I'm afraid
+          #                         to touch kernel-install)
+          #   - .*\.(in|SKELETON) - all template/skeleton files
+          #   - tools/coverity\.sh - external file (with some modifications)
+          FILTER_REGEX_EXCLUDE: .*/(man/.*|src/kernel-install/.*|.*\.(in|SKELETON)|tools/coverity\.sh)$
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+          MULTI_STATUS: true
+          VALIDATE_ALL_CODEBASE: false
+          VALIDATE_BASH: true