[Tarantool-patches] [PATCH v2 6/6] gitlab-ci: enable static analysis with luacheck

Alexander Tikhonov avtikhon at tarantool.org
Thu Apr 9 07:20:55 MSK 2020


Hi Sergey, thank you for the patch, please check my comments below.

  
>Среда, 8 апреля 2020, 18:43 +03:00 от Sergey Bronnikov <estetus at gmail.com>:
> 
>From: Sergey Bronnikov < sergeyb at tarantool.org >
>
>Closes #4681
>---
Please add in the review letter the link to the branch here, also the issue link.
> .gitlab-ci.yml | 9 +++++++++
> .travis.mk | 12 +++++++++++-
> 2 files changed, 20 insertions(+), 1 deletion(-)
>
>diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
>index cd710027f..adbd892c8 100644
>--- a/.gitlab-ci.yml
>+++ b/.gitlab-ci.yml
>@@ -1,4 +1,5 @@
> stages:
>+ - static_analysis
Do we really need the separate stage for this job ? As we agreed with A. Turenko before, we create stages only for jobs that needs additional steps w/o next steps wont work and which can be used in the next stage for more than single job.
Anyway separate stage will add depends for the rest of the jobs, which can be blocked because of any issue with luacheck, like it can be luacheck cloning either its depends installations:

Installing http://rocks.tarantool.org/luacheck-scm-1.rockspec
Missing dependencies for luacheck scm-1:
   argparse >= 0.6.0 (not installed)
luacheck scm-1 depends on argparse >= 0.6.0 (not installed)
Installing http://rocks.tarantool.org/argparse-0.6.0-1.rockspec  
Cloning into 'luacheck'...
remote: Enumerating objects: 42, done.
remote: Counting objects: 100% (42/42), done.
remote: Compressing objects: 100% (25/25), done.
remote: Total 6077 (delta 15), reused 30 (delta 13), pack-reused 6035
Receiving objects: 100% (6077/6077), 2.18 MiB | 1.57 MiB/s, done.
Resolving deltas: 100% (3980/3980), done.
luacheck scm-1 is now installed in /root/tarantool/.rocks (license: MIT)
 
>   - test
>   - perf
>   - cleanup
>@@ -96,6 +97,14 @@ variables:
>   script:
>     - ${GITLAB_MAKE} perf_run
> 
>+# Static Analysis
>+
>+luacheck:
>+ <<: *docker_test_definition
>+ stage: static_analysis
>+ script:
>+ - ${GITLAB_MAKE} test_debian_luacheck
>+
> # Tests
> 
> release:
>diff --git a/.travis.mk b/.travis.mk
>index f709a18b6..32222621b 100644
>--- a/.travis.mk
>+++ b/.travis.mk
>@@ -77,8 +77,9 @@ deps_buster_clang_8: deps_debian
> # Release
> 
> build_debian:
>- cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_WERROR=ON ${CMAKE_EXTRA_PARAMS}
>+ cmake . -DENABLE_DIST=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_WERROR=ON ${CMAKE_EXTRA_PARAMS}
This target is common wide along all the jobs and if ENABLE_DIST define is not adding changes for them may be just need add the comment the purpose on its adding.
>  make -j
>+ sudo make install
This target is common wide along all the jobs and may be it better to move the installation to the target ‘luacheck’ which only needs it.
> 
> test_debian_no_deps: build_debian
>  cd test && /usr/bin/python test-run.py --force $(TEST_RUN_EXTRA_PARAMS)
>@@ -145,6 +146,15 @@ test_static_build: deps_debian_static
> test_static_docker_build:
>  docker build --network=host --build-arg RUN_TESTS=ON -f Dockerfile.staticbuild .
> 
>+# ###################
>+# Static Analysis
>+# ###################
>+
>+test_debian_luacheck: build_debian
>+ tarantoolctl rocks install luacheck
>+ # TODO: run in parallel with LuaLanes
>+ .rocks/bin/luacheck --codes --config .luacheckrc .
>+
> #######
> # OSX #
> #######
>--
>2.23.0
>  
 
 
--
Alexander Tikhonov
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20200409/71fd6fd7/attachment.html>


More information about the Tarantool-patches mailing list