Skip to content

Commit

Permalink
try luacheck
Browse files Browse the repository at this point in the history
  • Loading branch information
ProditorMagnus committed Jun 14, 2024
1 parent 4da3de9 commit 0bce2af
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/luacheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Luacheck
on: [push, pull_request]
jobs:
sile:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Luacheck linter
uses: nebularg/actions-luacheck@v1
15 changes: 15 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
max_line_length=140
-- show the warning/error codes as well
codes=true
-- skip showing files with no issues
quiet=1
-- checks related to undefined variable usage
-- there can be warnings because luacheck is unaware of Wesnoth's
-- lua environment and has no way to check which have been loaded
globals={"wesnoth","wml","gui","filesystem","unit_test","stringx","mathx","ai"}
-- allow_defined=true
-- allow_defined_top=true
-- skip showing unused variables
-- unused=false
-- skip showing warnings about shadowing upvalues
-- ignore={"431"}

3 comments on commit 0bce2af

@ProditorMagnus
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cooljeanius
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing newlines at EOF

@cooljeanius
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also 200 would probably be a good value for the max_line_length= setting here

Please sign in to comment.