Skip to content

Commit ced3a84

Browse files
try fixing clang-tidy
1 parent 0f1d92c commit ced3a84

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

Diff for: .github/workflows/ci.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ jobs:
9393
**.cpp
9494
**.hpp
9595
- if: ${{ steps.changed-cpp-files.outputs.all_changed_files != '' }}
96-
run: run-clang-tidy -j $(nproc --all) -p build/ -export-fixes clang-tidy-fixes.yaml -config "$(cat src/fuse/.clang-tidy)" ${{ steps.changed-cpp-files.outputs.all_changed_files }}
96+
# https://stackoverflow.com/questions/48404289/using-clang-tidy-to-check-c17-code
97+
run: run-clang-tidy -j $(nproc --all) -p build/ -export-fixes clang-tidy-fixes.yaml -config "$(cat src/fuse/.clang-tidy)" -extra-arg=-std=c++17 ${{ steps.changed-cpp-files.outputs.all_changed_files }}
9798
working-directory: /colcon_ws
9899
- uses: asarium/[email protected]
99100
with:

Diff for: fuse_models/src/unicycle_2d_ignition.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,8 @@ void Unicycle2DIgnition::process(const geometry_msgs::msg::PoseWithCovarianceSta
268268
// It needs to be free to handle the response to this service call.
269269
// Have a callback do the rest of the work when a response comes.
270270
auto result_future = reset_client_->async_send_request(
271-
srv, [this, post_process, pose](rclcpp::Client<std_srvs::srv::Empty>::SharedFuture result) {
272-
(void)result;
271+
// NOLINTNEXTLINE(performance-unnecessary-value-param)
272+
srv, [this, post_process, pose](rclcpp::Client<std_srvs::srv::Empty>::SharedFuture /*result*/) {
273273
// Now that the pose has been validated and the optimizer has been reset, actually send the
274274
// initial state constraints to the optimizer
275275
sendPrior(pose);

Diff for: run_clang_tidy.bash

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
22

33
# -j $(nproc --all) runs with all cores, but the prepended nice runs with a low priority so it won't make your computer unusable while clang tidy is going. The "$@" at the end passes all the filenames from pre-commit so it should only look for clang tidy fixes in the files you directly changed in the commit that is being checked.
4-
nice run-clang-tidy -p ../../build_dbg -j $(nproc --all) -quiet -fix "$@"
4+
nice run-clang-tidy -p ../../build_dbg -j $(nproc --all) -quiet -fix -extra-arg=-std=c++17 "$@"

0 commit comments

Comments
 (0)