42School / norminette

Official 42 norminette
MIT License
926 stars 138 forks source link

Function prototype counted as global variable. #506

Open sugoidesune opened 1 month ago

sugoidesune commented 1 month ago

Describe the bug Function prototype counted as global variable.

Erroneous code

int (*grid(void))[8]; 

Additional infos norminette 3.3.55

Notice: GLOBAL_VAR_DETECTED  (line:  15, col:   1): Global variable present in file. Make sure it is a reasonable choice.
Error: GLOBAL_VAR_NAMING    (line:  15, col:   7):  Global variable must start with g_

Additional context This function throws no norminette or compiler errors, compiles properly and maintains the proper return type.


int (*grid(int agrid[5][8]))[8] {

   // ... computation etc
    return agrid;
}