c_formatter_42
c_formatter_42 copied to clipboard
Does not break line when line is too long in header
Introduction
In this file header file, the formatter does not break line when line is too long :
Current format
#ifndef DOUBLE_LINKED_LIST_ESSENTIALS_H
# define DOUBLE_LINKED_LIST_ESSENTIALS_H
# include "../double_linked_list/double_linked_list_essentials.h"
# include "../node.h"
/**
* @brief The structure of a double linked list
*/
typedef struct double_linked_list
{
t_node *head;
t_node *tail;
unsigned int size;
} t_double_linked_list;
/**
* @brief Create a new linked list, the linked list is LIFO (Last In First Out)
* @return The new linked list
*/
t_double_linked_list *double_linked_list_create(void);
/**
* @brief Free the linked list and its content
* @param obj The linked list to free
* @param free_content The function to free the content of the linked list,
can be NULL if the content is in stack
*/
void double_linked_list_free(t_double_linked_list *obj,
void (*free_content)(void *));
/**
* @brief Remove head element from the linked list
* @param obj The linked list to remove the last element
* @param free_content The function to free the content of the linked list,
* can be NULL if the content is in stack
*/
void double_linked_list_remove_head(t_double_linked_list *obj,
void (*free_content)(void *));
#endif // DOUBLE_LINKED_LIST_ESSENTIALS_H
Error line too long
Expected format
It should be :
#ifndef DOUBLE_LINKED_LIST_ESSENTIALS_H
# define DOUBLE_LINKED_LIST_ESSENTIALS_H
# include "../double_linked_list/double_linked_list_essentials.h"
# include "../node.h"
/**
* @brief The structure of a double linked list
*/
typedef struct double_linked_list
{
t_node *head;
t_node *tail;
unsigned int size;
} t_double_linked_list;
/**
* @brief Create a new linked list, the linked list is LIFO (Last In First Out)
* @return The new linked list
*/
t_double_linked_list *double_linked_list_create(void);
/**
* @brief Free the linked list and its content
* @param obj The linked list to free
* @param free_content The function to free the content of the linked list,
can be NULL if the content is in stack
*/
void double_linked_list_free(t_double_linked_list *obj,
void (*free_content)(void *));
/**
* @brief Remove head element from the linked list
* @param obj The linked list to remove the last element
* @param free_content The function to free the content of the linked list,
* can be NULL if the content is in stack
*/
void double_linked_list_remove_head(
t_double_linked_list *obj,
void (*free_content)(void *));
#endif // DOUBLE_LINKED_LIST_ESSENTIALS_H