From ccd8d4339d6a192876e0515924dde714b61ef66f Mon Sep 17 00:00:00 2001 From: Stephen Nicholas Swatman Date: Tue, 11 Jun 2024 19:11:02 +0200 Subject: [PATCH] Add a formatting image with `clang-format` 18 As we move ahead to using newer compiler features in projects like traccc, some features are not properly formatted by the older versions of `clang-format`. This commit adds a new image with version 18 of `clang-format` which should support a broader range of features. --- format18/Dockerfile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 format18/Dockerfile diff --git a/format18/Dockerfile b/format18/Dockerfile new file mode 100644 index 0000000..9194eae --- /dev/null +++ b/format18/Dockerfile @@ -0,0 +1,20 @@ +# Docker machinery, part of the ACTS project +# +# (c) 2024 CERN for the benefit of the ACTS project +# +# Mozilla Public License Version 2.0 + +FROM ubuntu:24.04 + +LABEL description="Ubuntu with clang-format v18" +LABEL maintainer="Stephen Nicholas Swatman " +# increase whenever any of the RUN commands change +LABEL version="1" + +RUN apt-get -y update \ + && apt-get -y install clang-format-18 git \ + && apt-get clean all \ + && update-alternatives \ + --install /usr/bin/clang-format clang-format /usr/bin/clang-format-18 100 \ + --slave /usr/bin/clang-format-diff clang-format-diff /usr/bin/clang-format-diff-18 \ + --slave /usr/bin/git-clang-format git-clang-format /usr/bin/git-clang-format-18