Skip to content

Commit

Permalink
Fix cpp Config (#199)
Browse files Browse the repository at this point in the history
* Fix cpp config

* Remove c_cpp_properties.json

* Update clang-tidy CI
  • Loading branch information
hhenry01 authored Nov 8, 2023
1 parent a02caed commit 5ed842d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 25 deletions.
14 changes: 14 additions & 0 deletions .devcontainer/config/sailbot_workspace.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,25 @@
"mypy-type-checker.interpreter": ["/usr/bin/python3"],

// c/c++

"C_Cpp.intelliSenseEngine": "disabled", // Use clangd intellisense instead (it's better)

"clangd.path": "/usr/bin/clangd",
"clangd.onConfigChanged": "restart",
"clangd.arguments": [
"-log=verbose",
"-pretty",
"--background-index",
"--compile-commands-dir=/workspaces/sailbot_workspace/build/"
],

"[cpp]": {
"editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd",
"editor.formatOnSave": true,
"editor.rulers": [120],
},
"[c]": {
"editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd",
"editor.formatOnSave": true,
"editor.rulers": [120],
},
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/clang-tidy/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ if [[ $LOCAL_RUN != "true" ]]; then
./build.sh RelWithDebInfo OFF
fi

python3 .github/actions/clang-tidy/ament_clang_tidy.py compile_commands.json --jobs 8
python3 .github/actions/clang-tidy/ament_clang_tidy.py build/compile_commands.json --jobs 8
18 changes: 0 additions & 18 deletions .vscode/c_cpp_properties.json

This file was deleted.

6 changes: 0 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,3 @@ colcon build \
--merge-install \
--symlink-install \
--cmake-args "-DCMAKE_BUILD_TYPE=$BUILD_TYPE" "-DSTATIC_ANALYSIS=$STATIC_ANALYSIS" "-DUNIT_TEST=$UNIT_TEST" "--no-warn-unused-cli"

# For Clangd
if [[ -f $ROS_WORKSPACE/build/compile_commands.json && ! -f $ROS_WORKSPACE/compile_commands.json ]]
then
ln -s $ROS_WORKSPACE/build/compile_commands.json $ROS_WORKSPACE
fi

0 comments on commit 5ed842d

Please sign in to comment.