Skip to content

Commit b6be18e

Browse files
Tools improvements (#11)
Improve code tools
1 parent 6678359 commit b6be18e

File tree

6 files changed

+16
-5
lines changed

6 files changed

+16
-5
lines changed

.devcontainer/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ RUN SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhisto
4646
&& chown -R $USERNAME /commandhistory \
4747
&& echo "$SNIPPET" >> "/home/$USERNAME/.bashrc"
4848

49-
# Set the user to vscode
49+
# Git completion
50+
RUN echo ". /usr/share/bash-completion/completions/git" >> "/home/$USERNAME/.bashrc"
51+
52+
# Set the user to vscode
5053
USER $USERNAME
5154

5255
# Set the workspace directory

.devcontainer/devcontainer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@
2929
"--security-opt",
3030
"seccomp=unconfined"
3131
],
32-
"remoteUser": "vscode"
32+
"remoteUser": "vscode",
33+
"postStartCommand": "./tools/generate-compilation-database.sh $PWD build-code-quality Debug tests"
3334
}

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
],
3030
"clang-tidy-on-active-file.autoRunOnSave": true,
3131
"clang-tidy-on-active-file.configPath": "/workspace/.clang-tidy",
32+
"clang-tidy-on-active-file.optionalArgs": "-p=build-code-quality",
3233
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
3334
"C_Cpp.codeAnalysis.clangTidy.enabled": true,
3435
"C_Cpp.codeAnalysis.clangTidy.useBuildPath": true,
@@ -117,5 +118,5 @@
117118
"typeinfo": "cpp",
118119
"semaphore": "cpp",
119120
"iostream": "cpp"
120-
},
121+
}
121122
}

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# ZIP
22

3-
[![build](https://github.com/andreiavrammsd/cpp-zip/workflows/build/badge.svg)](https://github.com/andreiavrammsd/cpp-zip/actions)
3+
[![build](https://github.com/andreiavrammsd/cpp-zip/workflows/build/badge.svg)](https://github.com/andreiavrammsd/cpp-zip/actions/workflows/test.yml)
4+
  [![build](https://github.com/andreiavrammsd/cpp-zip/workflows/release/badge.svg)](https://github.com/andreiavrammsd/cpp-zip/actions/workflows/release.yml)
45
  [![codecov](https://codecov.io/github/andreiavrammsd/cpp-zip/graph/badge.svg?token=TBV8ID8QK0)](https://codecov.io/github/andreiavrammsd/cpp-zip)
56
  [![documentation](https://img.shields.io/badge/msd::zip-Documentation-4EC820?labelColor=5E5E5E)](https://andreiavrammsd.github.io/cpp-zip/)
67

tools/code-quality.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ fi
2323

2424
./tools/generate-compilation-database.sh ${workspace} ${build_path} ${build_type} ${build_target}
2525

26+
# Build
27+
cwd=$PWD
28+
cd ${build_path}
29+
cmake --build . --config ${build_type} --target ${build_target}
30+
cd ${cwd}
31+
2632
# Find files
2733
files=$(if [ $event == "pull_request" ]; then
2834
git diff --name-only origin/"${default_branch}"...HEAD include

tools/generate-compilation-database.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,5 @@ cmake ${workspace} \
1919
-DCMAKE_BUILD_TYPE=${build_type} \
2020
-DENABLE_TESTS=ON \
2121
-DENABLE_BENCHMARKS=ON
22-
cmake --build . --config ${build_type} --target ${build_target}
2322

2423
cd ${cwd}

0 commit comments

Comments
 (0)