summaryrefslogtreecommitdiff
path: root/.github/workflows/lint.yml
blob: 99a3072e9df85dc8c621ccee70699160a0aa64d3 (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
name: Linting and style checking

on: [push, pull_request]

jobs:
  luacheck:
    name: Luacheck
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v3

      - name: Prepare
        run: |
          sudo apt-get update
          sudo apt-get install -y luarocks
          sudo luarocks install luacheck

      - name: Lint
        run: sudo make lint

  stylua:
    name: stylua
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v3
      - uses: JohnnyMorganz/stylua-action@v2
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          version: latest
          # CLI arguments
          args: --color always --check lua/