42School / norminette

Official 42 norminette
MIT License
956 stars 140 forks source link

When last line of the file has space, norminette would hide all previous erros and not even tell about the space on last line as error. #503

Open veliga-syutkin opened 4 months ago

veliga-syutkin commented 4 months ago

Describe When one would check norminette on a file, if it has only a space at the very last line, it would actually hide all previous errors and display this message (very difficult to understand, imho):

norminette_example2.c: Error!
    Error: Code ended unexpectedly.

Erroneous code

int main(void)
{
    // The header is 
    return (0); /*missing on purpose.*/
}

Additional infos Copy and paste the output of norminette --version command here.

$ norminette --version         
norminette 3.3.50

Additional context Here's quick view of the bug in the terminal (Linux Ubuntu 22.04 LTS): image