Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update build environment Dockerfile with latest static analysis tools #403

Open
jpswinski opened this issue May 16, 2024 · 0 comments
Open

Comments

@jpswinski
Copy link
Member

jpswinski commented May 16, 2024

The code supports running with the latest clang-tidy and cppcheck from the Ubuntu 24.04 packages, but the default packages in AL2023 do not have the latest version of these tools. As a result, the docker build environment does not run the latest checks, while our personal development machines do.

In order to run the latest static analysis, the Dockerfile.buildenv file needs to be updated to build the clang-tidy and cppcheck tools from source:

# install up-to-date llvm tools (clang-tidy)
RUN git clone https://github.com/llvm/llvm-project.git && \
    cd llvm-project && \
    git checkout llvmorg-18.1.5 && \
    mkdir -p /llvm-project/build && \
    cd /llvm-project/build && \
    cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" /llvm-project/llvm && \
    make -j8 && \
    make install

# install up-to-date cppcheck
RUN git clone https://github.com/danmar/cppcheck.git && \
    cd cppcheck && \
    git checkout 2.14.0 && \
    mkdir -p /cppcheck/build && \
    cd /cppcheck/build && \
    cmake -DCMAKE_BUILD_TYPE=Release -DMATCHCOMPILER -DHAVE_RULES -DCXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function" .. && \
    make -j8 && \
    make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant