From d3532f72a83bcdc3bea4a5a2a095b54c0a5b08df Mon Sep 17 00:00:00 2001 From: Eduardo Almeida Date: Tue, 5 Nov 2024 19:37:07 +0000 Subject: [PATCH] ci: Add instructions to cmake-format job to fix the style --- utils/tests/gitlab-ci-code-linting.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/utils/tests/gitlab-ci-code-linting.yml b/utils/tests/gitlab-ci-code-linting.yml index 9d4ecd79a..7efd285dc 100644 --- a/utils/tests/gitlab-ci-code-linting.yml +++ b/utils/tests/gitlab-ci-code-linting.yml @@ -126,7 +126,15 @@ cmake-format: - pip install pyyaml cmake cmake-format ninja script: - ./ns3 configure --enable-modules=core - - ./ns3 build cmake-format-check + - | + if (! ./ns3 build cmake-format-check) ; then + echo "Bad formatting detected in CMake files."; + echo "To fix the formatting issues, run the following command:"; + echo " $ ./ns3 build cmake-format"; + echo "Note that it requires having cmake-format installed in your system."; + echo "You might need to run \"./ns3 configure\" after installing it."; + exit 1; + fi timeout: 1h interruptible: true