-
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
enable nl_func_call_start_multi_line in uncrustify #210
Conversation
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with full green CI (linter tests).
One thing this does which is not great is it turns things like this: some_func({
1,
2,
}); Into: some_func(
{
1,
2,
}); Which I think isn't helpful or more correct. |
I thought that looked a little less good too, but I do think the pro (enforce line-break after paren) outweighs it. |
I can't say I really agree. I think it's frustrating to do things which don't make sense just because the linter is isn't smart enough to do the desired thing. And in the face of that I'd rather trust the developer and reviewers to get it right. I approved this pr and several of the connected ones, but honestly I'm not sure it's a step in the right direction. It's a lot of line changes which disrupt backporting and rebasing (for people who maintain patches on top of our code) for a sub-optimal enforcement of the rule... |
Why merge some of the pull requests? What if one of the reviews on the remaining repositories turned up something that suggested we shouldn't use this setting? |
Whether or not we move forward with enabling this rule, it has at least unveiled many instances where we were inconsistent with our style guide. So I think it's still worth fixing those, even though it will cause some churn. |
Nevermind. I see the quote in the original ticket. Just missed it. |
for ament/ament_lint#210 Co-Authored-By: Jacob Perron <jacob@openrobotics.org>
Style changes to conform to the new default setting introduced in ament/ament_lint#210. Arguments that do not fit on one line must start on a new line. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Style changes to conform to the new default setting introduced in ament/ament_lint#210. Arguments that do not fit on one line must start on a new line. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Follow up of #148.
This patch enforces that arguments not fitting in one line must start on a new line (as it is described in the ROS 2 development guide). While that requires quite a bit of existing code to be updated to be compliant the work is easily automated by calling
ament_uncrustify --reformat <path>
.Unfortunately nobody on the original ticket was willing to update existing code to comply with the proposed change. So this PR (and the referenced ones) are doing that.