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

[ament_cppcheck] add --enable=style #396

Open
vincentrou opened this issue Jul 11, 2022 · 2 comments
Open

[ament_cppcheck] add --enable=style #396

vincentrou opened this issue Jul 11, 2022 · 2 comments
Labels

Comments

@vincentrou
Copy link

I saw that coding style checks of cppcheck is not enabled : https://github.com/ament/ament_lint/blob/rolling/ament_cppcheck/ament_cppcheck/main.py#L145
For example, unused variables can be checked with this option.
Could you consider to add it ? I can make a PR for this.

@clalancette
Copy link
Contributor

Honestly, cppcheck is more-or-less completely disabled at the moment: https://github.com/ament/ament_lint/blob/rolling/ament_cppcheck/ament_cppcheck/main.py#L127 . It's just way too slow to use (cppcheck 2.x is something like 10x slower than cppcheck 1.9).

Additionally, even if we re-enable it, we already have 2 style checkers enabled for ROS 2 by default; uncrustify and cpplint. Adding a third one would most likely make it hard to please all of them.

That said, if you'd like to add a way to optionally enable style using cppcheck, please feel free to open a PR. We'll be happy to review.

@vincentrou
Copy link
Author

@clalancette Is it possible to review the PR #407 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants