diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index dd3f62d..ddae9d9 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -46,7 +46,10 @@ RUN SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhisto && chown -R $USERNAME /commandhistory \ && echo "$SNIPPET" >> "/home/$USERNAME/.bashrc" - # Set the user to vscode +# Git completion +RUN echo ". /usr/share/bash-completion/completions/git" >> "/home/$USERNAME/.bashrc" + +# Set the user to vscode USER $USERNAME # Set the workspace directory diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 1b51dba..db29994 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -29,5 +29,6 @@ "--security-opt", "seccomp=unconfined" ], - "remoteUser": "vscode" + "remoteUser": "vscode", + "postStartCommand": "./tools/generate-compilation-database.sh $PWD build-code-quality Debug tests" } diff --git a/.vscode/settings.json b/.vscode/settings.json index 46f9b83..dab2950 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -29,6 +29,7 @@ ], "clang-tidy-on-active-file.autoRunOnSave": true, "clang-tidy-on-active-file.configPath": "/workspace/.clang-tidy", + "clang-tidy-on-active-file.optionalArgs": "-p=build-code-quality", "C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools", "C_Cpp.codeAnalysis.clangTidy.enabled": true, "C_Cpp.codeAnalysis.clangTidy.useBuildPath": true, @@ -117,5 +118,5 @@ "typeinfo": "cpp", "semaphore": "cpp", "iostream": "cpp" - }, + } } diff --git a/README.md b/README.md index d05b4b8..65bc739 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # ZIP -[![build](https://github.com/andreiavrammsd/cpp-zip/workflows/build/badge.svg)](https://github.com/andreiavrammsd/cpp-zip/actions) +[![build](https://github.com/andreiavrammsd/cpp-zip/workflows/build/badge.svg)](https://github.com/andreiavrammsd/cpp-zip/actions/workflows/test.yml) +  [![build](https://github.com/andreiavrammsd/cpp-zip/workflows/release/badge.svg)](https://github.com/andreiavrammsd/cpp-zip/actions/workflows/release.yml)   [![codecov](https://codecov.io/github/andreiavrammsd/cpp-zip/graph/badge.svg?token=TBV8ID8QK0)](https://codecov.io/github/andreiavrammsd/cpp-zip)   [![documentation](https://img.shields.io/badge/msd::zip-Documentation-4EC820?labelColor=5E5E5E)](https://andreiavrammsd.github.io/cpp-zip/) diff --git a/tools/code-quality.sh b/tools/code-quality.sh index 18f264f..a8a8a09 100755 --- a/tools/code-quality.sh +++ b/tools/code-quality.sh @@ -23,6 +23,8 @@ fi ./tools/generate-compilation-database.sh ${workspace} ${build_path} ${build_type} ${build_target} +cmake --build . --config ${build_type} --target ${build_target} + # Find files files=$(if [ $event == "pull_request" ]; then git diff --name-only origin/"${default_branch}"...HEAD include diff --git a/tools/generate-compilation-database.sh b/tools/generate-compilation-database.sh index fd33022..0de27fd 100755 --- a/tools/generate-compilation-database.sh +++ b/tools/generate-compilation-database.sh @@ -19,6 +19,5 @@ cmake ${workspace} \ -DCMAKE_BUILD_TYPE=${build_type} \ -DENABLE_TESTS=ON \ -DENABLE_BENCHMARKS=ON -cmake --build . --config ${build_type} --target ${build_target} cd ${cwd}