Skip to content

Clang tidy add extra arg option and return 1 when any error is catched.#452

Open
wuisky wants to merge 4 commits intoament:rollingfrom
wuisky:clang-tidy-add-extra-arg-option
Open

Clang tidy add extra arg option and return 1 when any error is catched.#452
wuisky wants to merge 4 commits intoament:rollingfrom
wuisky:clang-tidy-add-extra-arg-option

Conversation

@wuisky
Copy link
Copy Markdown

@wuisky wuisky commented Sep 8, 2023

Hi there. Thank you for developing such nice tool.
However, i noticed that rclcpp use some c++17 features,
and without passing --extra-arg=-std=c++17 to clang-tidy it will report errors in these headers.
After this patch, we can pass extra-arg just like:

$ ament_clang_tidy path_to_compile_commands.json  --extra-arg=-std=c++17  --extra-arg=what-ever-you-want-to-pass

Also, i fix issues mentioned in #350 #411.
Hope this helps.

Signed-off-by: WU MENGHUNG <wu.menghung@jp.panasonic.com>
Signed-off-by: WU MENGHUNG <wu.menghung@jp.panasonic.com>
Signed-off-by: WU MENGHUNG <wu.menghung@jp.panasonic.com>
@wuisky wuisky force-pushed the clang-tidy-add-extra-arg-option branch from 6959c91 to 6210f2f Compare February 7, 2024 05:47
@wuisky wuisky force-pushed the clang-tidy-add-extra-arg-option branch from 8285481 to 6210f2f Compare September 6, 2024 08:25
@pucciland95
Copy link
Copy Markdown

pucciland95 commented Oct 2, 2024

A gentle ping since this is a particularly important update to let ament_clang_tidy be usable. Could this change also be ported to Humble branch?

Cheers,

Niccolo

@wuisky
Copy link
Copy Markdown
Author

wuisky commented Oct 3, 2024

@clalancette could you take a look of this PR?

@wjwwood wjwwood self-assigned this Oct 3, 2024
@acarrillo-civ
Copy link
Copy Markdown

This would be a great improvement, making ament_clang_tidy significantly easier to use if you want your build to fail on lint errors.

@adivardi
Copy link
Copy Markdown

adivardi commented Dec 3, 2025

Is there any update on that? Without that, running ament_clang_tidy in CI is not useful, since it will always pass

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

Successfully merging this pull request may close these issues.

5 participants