tutorial: run-clang-x

This commit is contained in:
martin 2023-07-07 11:40:40 +02:00
parent e0543ecc12
commit 923ca74fe4
3 changed files with 29 additions and 0 deletions

View File

@ -50,3 +50,21 @@ RUN apt-get install -y --no-install-recommends \
RUN ln -s /usr/bin/clang-format-${llvm_version} /usr/local/bin/clang-format
RUN ln -s /usr/bin/clang-tidy-${llvm_version} /usr/local/bin/clang-tidy
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# install clang wrappers
RUN mkdir -p /usr/local/run-clang-format
RUN wget -O clang-utils.tgz "https://github.com/lmapii/run-clang-format/releases/download/v1.4.10/run-clang-format-v1.4.10-i686-unknown-linux-gnu.tar.gz" && \
tar -C /usr/local/run-clang-format -xzf clang-utils.tgz --strip-components 1 && \
rm clang-utils.tgz
ENV PATH /usr/local/run-clang-format:$PATH
RUN run-clang-format --version
RUN mkdir -p /usr/local/run-clang-tidy
RUN wget -O clang-utils.tgz "https://github.com/lmapii/run-clang-tidy/releases/download/v0.2.1/run-clang-tidy-v0.2.1-i686-unknown-linux-gnu.tar.gz" && \
tar -C /usr/local/run-clang-tidy -xzf clang-utils.tgz --strip-components 1 && \
rm clang-utils.tgz
ENV PATH /usr/local/run-clang-tidy:$PATH
RUN run-clang-format --version

5
clang-format.json Normal file
View File

@ -0,0 +1,5 @@
{
"paths": ["./src/**/*.[ch]", "./include/**/*.[ch]", "./test/unittest/test/*.[ch]"],
"filterPre": [".*"],
"filterPost": ["./src/build/**", "./test/unittest/build/**", "./test/unittest/generated"]
}

6
clang-tidy.json Normal file
View File

@ -0,0 +1,6 @@
{
"paths": ["./src/**/*.[ch]"],
"filterPre": [".*"],
"filterPost": ["./build/**"],
"buildRoot": "./build"
}