From 46b5c16e1a8b126cd6f8fd688e1177f5e028cb27 Mon Sep 17 00:00:00 2001 From: Zhang Wei Date: Mon, 23 Oct 2023 11:27:52 -0400 Subject: [PATCH] Add clang-format10 to docker container. Also fixed clang-format. Add clang-format10 to docker container. Also fixed clang-format. --- .devcontainer/devcontainer.json | 2 +- .docker/dev_base.Dockerfile | 5 +++++ examples/llsm/llsm_aux/parallelReadTiff.c | 8 ++++---- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 9b288d79c..f2cea6564 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -59,7 +59,7 @@ "ZhangYue.rust-mod-generator" ], "settings": { - "C_Cpp.clang_format_path": "clang-format-11", + "C_Cpp.clang_format_path": "/home/project/software/clang-format-lint-action/clang-format/clang-format10", "terminal.integrated.scrollback": 10000 } } diff --git a/.docker/dev_base.Dockerfile b/.docker/dev_base.Dockerfile index 5ed2dc720..fde596838 100644 --- a/.docker/dev_base.Dockerfile +++ b/.docker/dev_base.Dockerfile @@ -63,6 +63,11 @@ RUN echo 'source $HOME/.cargo/env' >> ~/.bashrc ENV WORK_SPACE=/home/project RUN mkdir -p $WORK_SPACE +# Install clang-format repo +RUN mkdir -p $WORK_SPACE/software +RUN cd $WORK_SPACE/software && git clone https://github.com/DoozyX/clang-format-lint-action.git +ENV CLANG_FORMAT_PATH=$WORK_SPACE/software/clang-format-lint-action/clang-format/clang-format10 + # Clone the repositories WORKDIR $WORK_SPACE/source RUN git clone https://github.com/ofiwg/libfabric.git && \ diff --git a/examples/llsm/llsm_aux/parallelReadTiff.c b/examples/llsm/llsm_aux/parallelReadTiff.c index 4e353eb66..063c86f39 100644 --- a/examples/llsm/llsm_aux/parallelReadTiff.c +++ b/examples/llsm/llsm_aux/parallelReadTiff.c @@ -51,8 +51,8 @@ readTiffParallelBak(uint64_t x, uint64_t y, uint64_t z, const char *fileName, vo int counter = 0; while (!TIFFSetDirectory(tif, (uint64_t)dir) && counter < 3) { - printf("Thread %d: File \"%s\" Directory \"%"PRId64"\" failed to open. Try %d\n", w, fileName, dir, - counter + 1); + printf("Thread %d: File \"%s\" Directory \"%" PRId64 "\" failed to open. Try %d\n", w, + fileName, dir, counter + 1); counter++; } @@ -345,8 +345,8 @@ readTiffParallel2DBak(uint64_t x, uint64_t y, uint64_t z, const char *fileName, int counter = 0; while (!TIFFSetDirectory(tif, (uint64_t)0) && counter < 3) { - printf("Thread %d: File \"%s\" Directory \"%"PRId64"\" failed to open. Try %d\n", w, fileName, dir, - counter + 1); + printf("Thread %d: File \"%s\" Directory \"%" PRId64 "\" failed to open. Try %d\n", w, + fileName, dir, counter + 1); counter++; }