Skip to content

Commit

Permalink
Add a formatting image with clang-format 18
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
stephenswat committed Jun 11, 2024
1 parent 7680d98 commit ccd8d43
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions format18/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"
# 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

0 comments on commit ccd8d43

Please sign in to comment.