Open rotu opened 4 years ago
Do you think this is related to the uncrustify configuration file provided by the package or a bug in uncrustify itself? If it is the latter please create a ticket in the upstream uncrustify repository instead.
Investigating... It may even be a bug of the pinned version of uncrustify
in uncrustify_vendor
. Nevertheless, even if it's a problem in the upstream code, it's a functional shortcoming that ought to be documented against ament_lint
somehow, since the intent is to faithfully enforce the coding standards.
Alright. It seems that uncrustify (current HEAD version) does not treat object direct initialization (of the form var Class(args ...)
) as function calls for purposes of nl_func_call_start_multi_line
and I can't find a configuration option
I can see 3 possible resolutions. I'm leaning toward 2 or 3:
It seems
ament_uncrustify
misses a required newline in the below code. A line break is required afterfilter(
, but for some reason,ament_uncrustify
fails to enforce it.https://github.com/ros2/rclcpp/blob/ee6ab95cfc8ecab353d4cf1efdb81de237424f11/rclcpp/src/rclcpp/time_source.cpp#L247-L250