feat: add pre-commit ci (#1824)

This commit is contained in:
yetone
2025-04-07 14:55:21 +08:00
committed by GitHub
parent 1e2e233ff5
commit f83378a67e
7 changed files with 46 additions and 83 deletions

View File

@@ -53,30 +53,6 @@ jobs:
nvim --version
make luatest
stylua:
name: Check Lua style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # ratchet:actions/checkout@v4
- name: Install stylua
uses: baptiste0928/cargo-install@v3
with:
crate: stylua
features: lua54
- run: stylua --version
- run: stylua --color always --check ./lua/ ./plugin/ ./tests/
luacheck:
name: Lint Lua
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # ratchet:actions/checkout@v4
- name: Luacheck linter
uses: lunarmodules/luacheck@cc089e3f65acdd1ef8716cc73a3eca24a6b845e4 # ratchet:lunarmodules/luacheck@v1
with:
args: ./lua/
typecheck:
name: Typecheck
runs-on: ubuntu-latest