Skip to content

Commit

Permalink
Setup luacheck
Browse files Browse the repository at this point in the history
Currently runs clean.
  • Loading branch information
idbrii committed Jun 23, 2021
1 parent ff55d77 commit ec01f2f
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/luacheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Linting

on: [push, pull_request]

jobs:
luacheck:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Lua
uses: leafo/gh-actions-lua@v8
with:
luaVersion: 5.4
- name: Setup Lua Rocks
uses: leafo/gh-actions-luarocks@v4
- name: Setup luacheck
run: luarocks install luacheck
- name: Run Code Linter
run: |
luacheck .
15 changes: 15 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
-- love uses luajit with some extras (unpack) from 5.2
std = "love+luajit+lua52"

-- These are acceptable to me, but not currently necessary.
--~ max_line_length = false -- Do not limit line length.
--~ unused_secondaries = false -- Filter out warnings related to unused variables set together with used ones.

exclude_files = {
-- leafo/gh-actions-lua & luarocks put lua files here
'.install',
'.lua',
'.luarocks',
}

-- vim:set et sw=4 ts=4 ft=lua:

0 comments on commit ec01f2f

Please sign in to comment.