Open mjy9088 opened 2 years ago
Describe the bug
incorrect TOO_MANY_TAB error
TOO_MANY_TAB
Erroneous code
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_simple_map_dynamic_get.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: Juyeong Maing <jmaing@student.42seoul.kr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/06/06 13:23:42 by Juyeong Maing #+# #+# */ /* Updated: 2022/06/06 13:33:10 by Juyeong Maing ### ########.fr */ /* */ /* ************************************************************************** */ #include "ft_simple_map_internal.h" bool ft_simple_map_dynamic_get( t_ft_simple_map_dynamic *self, const void *key, size_t key_length, void **out ) { if (!key_length) { *out = self->value; return (!*out); } if (!self->array[*((unsigned char *)key)]) return (true); return ( ft_simple_map_dynamic_get( self->array[*((unsigned char *)key)], &((unsigned char *)key)[1], key_length - 1, out ) ); }
src/ft_simple_map_dynamic_get.c: Error! Error: TOO_MANY_TAB (line: 33, col: 13): Extra tabs for indent level Error: TOO_MANY_TAB (line: 34, col: 13): Extra tabs for indent level Error: TOO_MANY_TAB (line: 35, col: 9): Extra tabs for indent level
Additional infos
Darwin m1jy 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:29 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T8101 arm64
Python 3.8.9
norminette 3.3.51
Additional context
norminette doesn't complain with code below:
return ( ft_simple_map_dynamic_get( self->array[*((unsigned char *)key)], &((unsigned char *)key)[1], key_length - 1, out ) );
This bug can be circumvented by using (less readable) pointer arithmetic way
return ( ft_simple_map_dynamic_get( self->array[*((unsigned char *)key)], ((unsigned char *)key) + 1, key_length - 1, out ) );
duplicate #277
Describe the bug
incorrect
TOO_MANY_TAB
errorErroneous code
Additional infos
Darwin m1jy 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:29 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T8101 arm64
Python 3.8.9
norminette 3.3.51
Additional context
norminette doesn't complain with code below:
This bug can be circumvented by using (less readable) pointer arithmetic way