Skip to content
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

Does not break line when line is too long in header #77

Open
MathieuSoysal opened this issue Apr 27, 2024 · 0 comments
Open

Does not break line when line is too long in header #77

MathieuSoysal opened this issue Apr 27, 2024 · 0 comments

Comments

@MathieuSoysal
Copy link

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

image

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
@MathieuSoysal MathieuSoysal changed the title Does not break line when line is too long. Does not break line when line is too long in header Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant