Commit 905cc6ac authored by Tomas Krizek's avatar Tomas Krizek

gitlabci: fix lint:luacheck

parent c72bc72d
......@@ -150,15 +150,12 @@ lint:pedantic:
-Wpedantic -Wno-newline-eof -Wno-gnu-zero-variadic-macro-arguments -Wno-gnu-folding-constant'
- ninja -C build_pedantic_clang
lint:lua:
lint:luacheck:
<<: *test_nodep
stage: test
except:
- master
dependencies: [] # do not download build artifacts
script:
- make lint-lua
tags:
- docker
- meson build_ci_luacheck
- ninja -C build_ci_luacheck luacheck
lint:scan-build:
<<: *test
......
......@@ -25,14 +25,17 @@ run_target( # run manually to re-generate kres-gen.lua
command: find_program('./kres-gen.sh'),
)
# install daemon lua sources
install_data([
lua_src = [
config_lua,
files('kres.lua'),
files('kres-gen.lua'),
files('sandbox.lua'),
trust_anchors,
files('zonefile.lua'),
],
]
# install daemon lua sources
install_data(
lua_src,
install_dir: lib_dir,
)
......@@ -154,21 +154,6 @@ if get_option('bench').enabled()
endif
# Lint
message('--- lint dependencies ---')
clangtidy = find_program('clang-tidy', required: false)
message('-------------------------')
if clangtidy.found()
run_target(
'tidy',
command: [
clangtidy,
'-quiet',
'-p', meson.build_root(),
] + c_src_lint
)
endif
# Tests
subdir('tests')
......@@ -194,6 +179,35 @@ install_data(
)
# Lint
message('--- lint dependencies ---')
clangtidy = find_program('clang-tidy', required: false)
luacheck = find_program('luacheck', required: false)
message('-------------------------')
if clangtidy.found()
run_target(
'tidy',
command: [
clangtidy,
'-quiet',
'-p', meson.build_root(),
] + c_src_lint
)
endif
if luacheck.found()
run_target(
'luacheck',
command: [
luacheck,
'--codes',
'--formatter', 'TAP',
] + lua_mod_src + lua_src,
)
endif
# Summary message
# NOTE: ternary operator in format() not supported
# https://github.com/mesonbuild/meson/issues/2404
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment