summaryrefslogtreecommitdiffstats
path: root/.github/workflows/linter.yml
blob: 3fdb24b0ead5a72dc974cf7676053a07405a535d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
# vi: ts=2 sw=2 et:
# SPDX-License-Identifier: LGPL-2.1-or-later
# https://github.com/marketplace/actions/super-linter
name: Lint Code Base

on:
  pull_request:
    branches:
      - main
      - v[0-9]+-stable

permissions:
  contents: read

jobs:
  build:
    name: Lint Code Base
    runs-on: ubuntu-latest
    concurrency:
      group: ${{ github.workflow }}-${{ github.ref }}
      cancel-in-progress: true

    steps:
      - name: Repo checkout
        uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
        with:
          # We need a full repo clone
          fetch-depth: 0

      - name: Lint Code Base
        uses: github/super-linter/slim@ae4e373c56efad95924d9cc6b89624fdb2333007
        env:
          DEFAULT_BRANCH: main
          MULTI_STATUS: false
          # Excludes:
          #   - man/.* - all snippets in man pages (false positives due to
          #              missing shebangs)
          #   - .*\.(in|SKELETON) - all template/skeleton files
          #                         except kernel-install
          #   - tools/coverity\.sh - external file (with some modifications)
          FILTER_REGEX_EXCLUDE: .*/(man/.*|([^k]|k(k|ek)*([^ek]|e[^kr]))*(k(k|ek)*e?)?\.(in|SKELETON)|tools/coverity\.sh)$
          VALIDATE_ALL_CODEBASE: false
          VALIDATE_BASH: true
          # FIXME: temporarily disable validation of GH Action files, since
          #        the current version of super-linter doesn't recognize
          #        ubuntu-22.04 as a valid runner specification. This should
          #        be fixed once https://github.com/github/super-linter/pull/2897
          #        is merged, which includes
          #        https://github.com/rhysd/actionlint/commit/09a60b0f5761c2d066def294e541c25a89756eea
          #VALIDATE_GITHUB_ACTIONS: true