aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 144e22916a1a537b75f71bf2e25978d63b26ba4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
.PHONY: check format check-luacheck check-format

LUA_FILES := $(shell find -name "*.lua" -not -path "./json.lua")

TEST_FILES := $(shell find -name "*_test.lua")

check: check-luacheck check-format

check-luacheck:
	luacheck --globals=vis -- $(LUA_FILES)

check-format:
	set -e; for lf in $(LUA_FILES); do tools/check-format "$${lf}"; done

format:
	lua-format -i $(LUA_FILES)

test:
	set -e; for tf in $(TEST_FILES); do "$$tf"; done