Skip to content

Commit 31c498c

Browse files
SpollaLclaude
andcommitted
ci: add GitHub Actions workflow for lint and format checks
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent c2e0763 commit 31c498c

3 files changed

Lines changed: 46 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
lint:
11+
name: Lint (luacheck)
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Install luacheck
17+
run: sudo apt-get install -y luacheck
18+
19+
- name: Run luacheck
20+
run: luacheck lua/ plugin/
21+
22+
format:
23+
name: Format (stylua)
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- name: Install stylua
29+
uses: JohnnyMorganz/stylua-action@v4
30+
with:
31+
token: ${{ secrets.GITHUB_TOKEN }}
32+
version: latest
33+
args: --check lua/ plugin/

.luacheckrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
-- Globals provided by Neovim
2+
globals = { "vim" }
3+
4+
-- Don't complain about line length (stylua handles formatting)
5+
max_line_length = false
6+
7+
-- Ignore warnings about unused loop variables named "_"
8+
unused_args = false

stylua.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
column_width = 120
2+
line_endings = "Unix"
3+
indent_type = "Spaces"
4+
indent_width = 2
5+
quote_style = "AutoPreferDouble"

0 commit comments

Comments
 (0)