42School / norminette

Official 42 norminette
MIT License
944 stars 139 forks source link

#include outside include guard - doesn't produce expected error if no 42 header #284

Closed mjy9088 closed 2 years ago

mjy9088 commented 2 years ago

Describe the bug Expected HEADER_PROT_ALL error not occurs when #include outside include guard unless 42 header is present

Erroneous code

#include "../ft_lstring.h"

#ifndef ERROR_EXPECTED_H
# define ERROR_EXPECTED_H

const t_lstring g_test;

#endif

Additional infos

Additional context expected error below

jmaing@c8r5s8 test % norminette      
error_expected.h: Error!
Error: HEADER_PROT_ALL      (line:  15, col:   1):      Header protection must include all the instructions
/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   error_expected.h                                   :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: Juyeong Maing <jmaing@student.42seoul.k    +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2022/01/24 15:09:13 by Juyeong Mai       #+#    #+#             */
/*   Updated: 2022/01/24 15:09:21 by Juyeong Mai      ###   ########.fr       */
/*                                                                            */
/* ************************************************************************** */

#include "../ft_lstring.h"

#ifndef ERROR_EXPECTED_H
# define ERROR_EXPECTED_H

const t_lstring g_test;

#endif
mjy9088 commented 2 years ago

Found Error: INVALID_HEADER (line: 1, col: 1): Missing or invalid 42 header on latest version