aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/lint.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/lint.yml')
-rw-r--r--.github/workflows/lint.yml52
1 files changed, 25 insertions, 27 deletions
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 5c29559d0..cf9e9364f 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -1,52 +1,50 @@
name: Lint
on:
+ push:
+ branches:
+ - "main"
pull_request:
branches:
- "main"
+ workflow_dispatch:
jobs:
- luacheck:
- name: Luacheck
+ lua:
+ name: Lint Lua files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- - name: Prepare
+ - name: Format
run: |
- sudo apt-get update
- sudo apt-get install luarocks -y
- sudo luarocks install luacheck
+ make formatlua
+ git diff --exit-code
- - name: Run Luacheck
- run: luacheck .
+ - name: Lint
+ run: make checklua
- stylua:
- name: StyLua
+ queries:
+ name: Lint query files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- - name: Lint with stylua
- uses: JohnnyMorganz/stylua-action@v4
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
- version: latest
- args: --check .
- format-queries:
- name: Format queries
+ - name: Format
+ run: |
+ make formatquery
+ git diff --exit-code
+
+ - name: Lint
+ run: make lintquery
+
+ readme:
+ name: Lint docs
runs-on: ubuntu-latest
- env:
- NVIM_TAG: nightly
steps:
- uses: actions/checkout@v4
- - uses: tree-sitter/setup-action/cli@v1
- - name: Prepare
- run: |
- bash ./scripts/ci-install.sh
- - name: Lint
+ - name: Check SUPPORTED_LANGUAGES
run: |
- nvim -l scripts/install-parsers.lua query
- nvim -l scripts/format-queries.lua
+ make docs
git diff --exit-code