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

gitlabci: fix lint:luacheck

parent c72bc72d
...@@ -150,15 +150,12 @@ lint:pedantic: ...@@ -150,15 +150,12 @@ lint:pedantic:
-Wpedantic -Wno-newline-eof -Wno-gnu-zero-variadic-macro-arguments -Wno-gnu-folding-constant' -Wpedantic -Wno-newline-eof -Wno-gnu-zero-variadic-macro-arguments -Wno-gnu-folding-constant'
- ninja -C build_pedantic_clang - ninja -C build_pedantic_clang
lint:lua: lint:luacheck:
<<: *test_nodep
stage: test stage: test
except:
- master
dependencies: [] # do not download build artifacts
script: script:
- make lint-lua - meson build_ci_luacheck
tags: - ninja -C build_ci_luacheck luacheck
- docker
lint:scan-build: lint:scan-build:
<<: *test <<: *test
......
...@@ -25,14 +25,17 @@ run_target( # run manually to re-generate kres-gen.lua ...@@ -25,14 +25,17 @@ run_target( # run manually to re-generate kres-gen.lua
command: find_program('./kres-gen.sh'), command: find_program('./kres-gen.sh'),
) )
lua_src = [
config_lua,
files('kres.lua'),
files('kres-gen.lua'),
files('sandbox.lua'),
trust_anchors,
files('zonefile.lua'),
]
# install daemon lua sources # install daemon lua sources
install_data([ install_data(
config_lua, lua_src,
files('kres.lua'),
files('kres-gen.lua'),
files('sandbox.lua'),
trust_anchors,
files('zonefile.lua'),
],
install_dir: lib_dir, install_dir: lib_dir,
) )
...@@ -154,21 +154,6 @@ if get_option('bench').enabled() ...@@ -154,21 +154,6 @@ if get_option('bench').enabled()
endif 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 # Tests
subdir('tests') subdir('tests')
...@@ -194,6 +179,35 @@ install_data( ...@@ -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 # Summary message
# NOTE: ternary operator in format() not supported # NOTE: ternary operator in format() not supported
# https://github.com/mesonbuild/meson/issues/2404 # 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