From: Matthew Fernandez Date: Mon, 31 Jan 2022 02:34:12 +0000 (+1100) Subject: CI: add a job for enforcing CMake file formatting X-Git-Tag: 3.0.0~49^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=07f9a2dae3ad3d28588e68548fa4e6f7c4a7b8da;p=graphviz CI: add a job for enforcing CMake file formatting This should hopefully reduce the mental load on MR reviewers going forwards. --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 292e8abd6..480d22dfe 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1473,6 +1473,16 @@ docker_push_ubuntu-21.10: needs: - docker_build_ubuntu-21.10 +lint_cmake_format: + image: "$CI_REGISTRY_IMAGE/ubuntu-21.10:$CI_COMMIT_SHA" + stage: test + needs: + - docker_build_ubuntu-21.10 + script: + - git ls-files -z -- '**/CMakeLists.txt' '**/*.cmake' '**/*.cmake.in' | xargs -0 -- python3 -m cmakelang.lint + except: + - tags + lint_pylint: image: "$CI_REGISTRY_IMAGE/ubuntu-21.10:$CI_COMMIT_SHA" stage: test diff --git a/requirements.txt b/requirements.txt index 81c7356c8..8ade03ac0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ +cmakelang==0.6.13 pylint==2.11.1 pytest==6.2.4