File: lint.yml

package info (click to toggle)
dracut 106-6
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 4,708 kB
  • sloc: sh: 24,384; ansic: 4,704; makefile: 315; perl: 186; python: 28; javascript: 19
file content (64 lines) | stat: -rw-r--r-- 1,426 bytes parent folder | download | duplicates (2)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
---
name: Lint

on:  # yamllint disable-line rule:truthy
  pull_request:
    branches: [main]
    paths-ignore:
      - antora-playbook.yaml
      - 'doc_site/**'
      - 'man/**'

jobs:
  lint-shell:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: shfmt
        uses: luizm/action-sh-checker@v0.9.0
        env:
          SHFMT_OPTS: -s  # arguments to shfmt.
        with:
          # disable shellcheck in favor of differential-shellcheck
          sh_checker_shellcheck_disable: true

  differential-shellcheck:
    runs-on: ubuntu-latest

    permissions:
      security-events: write

    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - id: ShellCheck
        name: Differential ShellCheck
        uses: redhat-plumbers-in-action/differential-shellcheck@v5
        with:
          token: ${{ secrets.GITHUB_TOKEN }}

      - if: ${{ always() }}
        name: Upload artifact with ShellCheck defects in SARIF format
        uses: actions/upload-artifact@v4
        with:
          name: Differential ShellCheck SARIF
          path: ${{ steps.ShellCheck.outputs.sarif }}

  lint-c:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: install tools
        run: sudo apt-get install astyle

      - name: indent
        run: make indent-c

      - name: check formatting
        run: git diff --exit-code