ci(lint): rockspec
ci/woodpecker/pr/docker-build Pipeline was successful Details
ci/woodpecker/pr/test Pipeline failed Details
ci/woodpecker/pr/lint Pipeline failed Details
ci/woodpecker/pr/build Pipeline was successful Details

This commit is contained in:
Aire-One 2023-09-10 19:55:03 +02:00
parent ac1ba61cb2
commit c67c9362da
3 changed files with 21 additions and 2 deletions

View File

@ -34,6 +34,7 @@
"modname", "modname",
"reportfile", "reportfile",
"rockspec", "rockspec",
"rockspecs",
"rstrip", "rstrip",
"runreport", "runreport",
"setopt", "setopt",

View File

@ -18,6 +18,17 @@ pipeline:
# path: # path:
# - ".woodpecker/**" # - ".woodpecker/**"
lint-rockspec:
image: gitea.aireone.xyz/aire-one/awesomewm.d.tl/luacheck_just:latest
group: lint
commands:
- just check-rockspec
when:
path:
- ".woodpecker/**"
- "awesomewm-d-tl-dev-1.rockspec"
- "rockspec/*.rockspec"
lint-lua: lint-lua:
image: gitea.aireone.xyz/aire-one/awesomewm.d.tl/luacheck_just:latest image: gitea.aireone.xyz/aire-one/awesomewm.d.tl/luacheck_just:latest
group: lint group: lint

View File

@ -4,10 +4,11 @@ lua := "lua" + " -l set_paths"
tl := "tl run" + " -l set_paths" tl := "tl run" + " -l set_paths"
rocks_tree := "lua_modules" rocks_tree := "lua_modules"
rockspec_file := "rockspecs/awesomewm.d.tl-dev-1.rockspec" rockspec_file := "awesomewm.d.tl-dev-1.rockspec"
lua_targets := `find src/ -type f -iname '*.lua' | xargs` + " " + `ls *.lua | xargs` lua_targets := `find src/ -type f -iname '*.lua' | xargs` + " " + `ls *.lua | xargs`
teal_targets := `find src/ types/ -type f -iname '*.tl' | xargs` teal_targets := `find src/ types/ -type f -iname '*.tl' | xargs`
rockspec_targets := `find . -type f -iname '*.rockspec' | xargs`
local-install-dependencies: local-install-dependencies:
luarocks \ luarocks \
@ -29,7 +30,13 @@ check-teal:
check-format: check-format:
stylua --check {{ lua_targets }} stylua --check {{ lua_targets }}
check: check-lua check-format check-teal check-rockspecs:
luarocks \
--lua-version {{ lua_version }} \
lint \
{{ rockspec_targets }}
check: check-lua check-format check-teal check-rockspecs
build: build:
cyan build cyan build