Commit Graph

5 Commits

Author SHA1 Message Date
David Briscoe
d6af9f74c5 lint: Don't set unused locals
Not a bug, but pointless to store this variable since it's not used.
2022-03-03 10:17:35 -08:00
David Briscoe
9083ee74ca lint: Fix accessing undefined append_inplace
Fix crash when using append_inplace without batteries:export().

If you don't export batteries into the global namespace to stomp table,
then append_inplace would access a nil function because it's using table
instead of tablex.

We still use table inside init, but that's after we export to global
namespace.
2022-03-03 10:17:35 -08:00
David Briscoe
a5ebc1e501 lint: Fix shadow issues
Fix shadowing by using variables with a different name or _.

I don't think any of these warnings were actual bugs and fixed them to
maintain the same behaviour.
2022-03-03 10:17:34 -08:00
David Briscoe
8d41c6d3d1 lint: Fix whitespace issues
Remove excess whitespace and remove related ignores.
2022-03-03 10:17:34 -08:00
David Briscoe
66cb419db8 build: Add action for running luacheck
Run luacheck on CI to catch subtle errors.

Add a luacheckrc that ensures current code issues no warnings. We should
eventually try to remove many of these ignores.
2022-03-03 10:17:34 -08:00