c_formatter_42
c_formatter_42 copied to clipboard
Does not break lines over 80 characters in assignment or comparison when having pointer casts and arrow notation
Version
pip list
Package Version
---------------------- ------------------------------------
...
c-formatter-42 0.2.7
The following code is properly formatted:
void ft_example(void)
{
t_list *element;
t_list *next_element;
((t_node *)element->content)->index
+= ((t_node *)next_element->content)->index;
if (((t_node *)element->content)->index
&& ((t_node *)next_element->content)->index)
exec_logic(element);
}
whereas this one is not (the only difference being the operators used in the assignment and the comparison:
void ft_example(void)
{
t_list *element;
t_list *next_element;
((t_node *)element->content)->index = ((t_node *)next_element->content)->index;
if (((t_node *)element->content)->index > ((t_node *)next_element->content)->index)
exec_logic(element);
}
Tested using the formatter only, without any extension