-
Notifications
You must be signed in to change notification settings - Fork 107
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
Cannot satisfy both cpplint and uncrustify #158
Comments
IMHO, the first snippet I posted should pass without failures. |
Neither of the snippets complies with our text-form style guide. The long condition should be wrapped directory after the open parenthesis:
|
I tried that, but
The complete snippet: } else if (
!sub_ids.take_ownership_subscriptions.empty() &&
sub_ids.take_shared_subscriptions.size() <= 1
) { } else if (
!sub_ids.take_ownership_subscriptions.empty() &&
sub_ids.take_shared_subscriptions.size() > 1
) { P.S.: If I follow |
I just ran into this same issue while working on rmw_connextdds#22 |
Updating to a newer uncrustify may fix it, but that always has additional fallout. It's not something we are going to do right now, but we could consider updating uncrustify in H-Turtle. |
You can get around this by skipping cpplint for the line: |
added NOLINT whenever both cpplint and uncrustify cannot be satisfied ament/ament_lint#158 Signed-off-by: Harsh Deshpande <[email protected]>
added NOLINT whenever both cpplint and uncrustify cannot be satisfied ament/ament_lint#158 Signed-off-by: Harsh Deshpande <[email protected]>
So we actually did update both cpplint and uncrustify for Humble. @ivanpauno Can you give this another try on Rolling and see if your original issue is solved? |
I still can reproduce this. |
any updates guys? |
added NOLINT whenever both cpplint and uncrustify cannot be satisfied ament/ament_lint#158 Signed-off-by: Harsh Deshpande <[email protected]>
added NOLINT whenever both cpplint and uncrustify cannot be satisfied ament/ament_lint#158 Signed-off-by: Harsh Deshpande <[email protected]>
added NOLINT whenever both cpplint and uncrustify cannot be satisfied ament/ament_lint#158 Signed-off-by: Harsh Deshpande <[email protected]>
added NOLINT whenever both cpplint and uncrustify cannot be satisfied ament/ament_lint#158 Signed-off-by: Harsh Deshpande <[email protected]>
added NOLINT whenever both cpplint and uncrustify cannot be satisfied ament/ament_lint#158 Signed-off-by: Harsh Deshpande <[email protected]>
added NOLINT whenever both cpplint and uncrustify cannot be satisfied ament/ament_lint#158 Signed-off-by: Harsh Deshpande <[email protected]>
added NOLINT whenever both cpplint and uncrustify cannot be satisfied ament/ament_lint#158 Signed-off-by: Harsh Deshpande <[email protected]>
added NOLINT whenever both cpplint and uncrustify cannot be satisfied ament/ament_lint#158 Signed-off-by: Harsh Deshpande <[email protected]>
added NOLINT whenever both cpplint and uncrustify cannot be satisfied ament/ament_lint#158 Signed-off-by: Harsh Deshpande <[email protected]>
added NOLINT whenever both cpplint and uncrustify cannot be satisfied ament/ament_lint#158 Signed-off-by: Harsh Deshpande <[email protected]>
I've seen one case, where I can't make both pass (maybe, it's just my error).
If you have an
else if
, where the condition have to be split in two lines because it's too long, e.g.:cpplint
shows this failure:If an else has a brace on one side, it should have it on both [readability/braces] [5]
For every other possibility I've tried,
uncrustify
don't pass.For example:
The only way of working it around, is putting the
if
clause nested in theelse
. But that's only acceptable for oneelse if
, not for multiple.e.g.:
Triggered by ros2/rclcpp#778 (comment).
I've also used the last workaround somewhere else (I don't remember where).
The text was updated successfully, but these errors were encountered: