diff --git a/.vscode/settings.json b/.vscode/settings.json index f071b81..f1293ce 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -34,6 +34,7 @@ "modname", "reportfile", "rockspec", + "rockspecs", "rstrip", "runreport", "setopt", diff --git a/.woodpecker/lint.yml b/.woodpecker/lint.yml index 12c6e34..c984f9d 100644 --- a/.woodpecker/lint.yml +++ b/.woodpecker/lint.yml @@ -18,6 +18,17 @@ pipeline: # path: # - ".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: image: gitea.aireone.xyz/aire-one/awesomewm.d.tl/luacheck_just:latest group: lint diff --git a/justfile b/justfile index 9cae98d..87da3e3 100644 --- a/justfile +++ b/justfile @@ -4,10 +4,11 @@ lua := "lua" + " -l set_paths" tl := "tl run" + " -l set_paths" 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` teal_targets := `find src/ types/ -type f -iname '*.tl' | xargs` +rockspec_targets := `find . -type f -iname '*.rockspec' | xargs` local-install-dependencies: luarocks \ @@ -29,7 +30,13 @@ check-teal: check-format: 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: cyan build