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

Running ament_clang_tidy results in Could not find 'clang-tidy-6.0' executable #406

Open
RFRIEDM-Trimble opened this issue Sep 1, 2022 · 0 comments

Comments

@RFRIEDM-Trimble
Copy link
Contributor

RFRIEDM-Trimble commented Sep 1, 2022

Hello,

I would like to start using clang-tidy in all my ROS2 packages.

I am using the OSRF supplied ROS2 galactic docker image that comes with clang-tidy

root@rfriedm-us-dl01:~/tas-ros2-system# clang-tidy --version
LLVM (http://llvm.org/):
  LLVM version 10.0.0
  
  Optimized build.
  Default target: x86_64-pc-linux-gnu
  Host CPU: skylake-avx512

Docs recommends to use clang-tidy-6.0. but I don't have that version. I can install it directly with

apt install clang-tidy-6.0

I have built my package according to documentation.

colcon build --packages-up-to tas_tn_002 --mixin compile-commands --cmake-args -DBUILD_TESTING=ON

Now, I can run ament_clang_tidy successfully.

ament_clang_tidy build

If I don't go out and install ament-clang-tidy-6.0, I get this error:

Could not find 'clang-tidy-6.0' executable

Now, if I try using the cmake integration,with the appropriate calls package.xml and CMakeLists.txt, rosdep still doesn't install the depenency.

rosdep install -i path/to/tas_tn_002
...
  1. Is there a reason it is tied to clang-tidy-6, or can you support the version installed by OSRF for galactic?
  2. If version 6.0 is required, should I submit a PR with the command to install it?
  3. If I am using rosdep to install dependencies, why does it not install clang-tidy-6.0 as a dependency?
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