From b1bb13fd07060b9ed791270809e1cd19b37917a0 Mon Sep 17 00:00:00 2001 From: Vicente Adolfo Bolea Sanchez Date: Fri, 28 Jul 2023 13:35:20 -0400 Subject: [PATCH] fixup! format,ci: update clang-format to clang16 --- scripts/ci/scripts/run-clang-format.sh | 4 +--- scripts/developer/run-clang-format.sh | 7 +++++++ 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100755 scripts/developer/run-clang-format.sh diff --git a/scripts/ci/scripts/run-clang-format.sh b/scripts/ci/scripts/run-clang-format.sh index fd6d351484..c37ab4444d 100755 --- a/scripts/ci/scripts/run-clang-format.sh +++ b/scripts/ci/scripts/run-clang-format.sh @@ -19,9 +19,7 @@ then echo "clang-format:" echo " Code format checks failed." echo " Please run clang-format v16 your changes before committing:" - echo " You can use our CI image for this with:" - echo " docker run -itt --mount type=bind,source=$(pwd),target=/root/adios2 ghcr.io/ornladios/adios2:ci-formatting" - echo " cd /root/adios; scripts/ci/scripts/run-clang-format.sh" + echo " You can use our CI image for this with: scripts/developer/run-clang-format.sh" echo " The following changes are suggested:" echo "${DIFF}" echo "$(git diff --stat)" diff --git a/scripts/developer/run-clang-format.sh b/scripts/developer/run-clang-format.sh new file mode 100755 index 0000000000..fa6c3a5ab2 --- /dev/null +++ b/scripts/developer/run-clang-format.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +exec sudo docker run -itt --mount type=bind,source="$(pwd)",target=/root/adios2 \ + ghcr.io/ornladios/adios2:ci-formatting sh -c \ + "git config --global --add safe.directory /root/adios2 && + cd /root/adios2 && + ./scripts/ci/scripts/run-clang-format.sh"