just1truc / abricot-norminette Goto Github PK
View Code? Open in Web Editor NEWAbricot Norminette is meant for EPITECH Projects. [ PROMO 2026 ]
License: MIT License
Abricot Norminette is meant for EPITECH Projects. [ PROMO 2026 ]
License: MIT License
The folders into the include folder is reported as a G6 error.
Yes
Debian based
No response
For some strange reasons, Abricot on macOS doesn't work as it can't found the pcpp module.
But, after verifying with pip install pcpp
, the module is already installed. (output: Requirement already satisfied: pcpp in /usr/local/lib/python3.10/site-packages (1.30)
)
I found a temporary workaround :
pip install pcpp
command. Mine is /usr/local/lib/python3.10/site-packages
alias abricot='PYTHONPATH=/usr/local/lib/python3.10/site-packages abricot'
Abricot should then work properly.
I'm still working to find why it can't find the pcpp module...
Yes
macOS
No response
char **get_standard(void)
{ <== L6 ?
int i = -1;
char **res = NULL;
int st = 0;
int end = 0;
file_t *file = fourmilliere();
<=== L5 ?
res = malloc(sizeof(char *) * (file_t_size(file) + 1)); <=== l6
for (; file != NULL; file = file->next) {
if (i != -1 && !check_line(file->name))
return NULL;
if (my_strcmp(file->name, "##start\n") == 0)
st++;
if (my_strcmp(file->name, "##end\n") == 0)
end++;
res[++i] = file->name;
}
if (st != 1 || end != 1)
return NULL;
res[++i] = NULL;
return (res);
} <==== G2 ?
Yes
Debian based
No response
This inline structure in a .c file count as 3 functions
static const struct flag_s {
size_t value;
char key[32];
} FLAGS[] = {{BFD_NO_FLAGS, "BFD_NO_FLAGS"}, {HAS_RELOC, "HAS_RELOC"},
{EXEC_P, "EXEC_P"}, {HAS_LINENO, "HAS_LINENO"}, {HAS_DEBUG, "HAS_DEBUG"},
{HAS_SYMS, "HAS_SYMS"}, {HAS_LOCALS, "HAS_LOCALS"}, {DYNAMIC, "DYNAMIC"},
{WP_TEXT, "WP_TEXT"}, {D_PAGED, "D_PAGED"}};
/*
** EPITECH PROJECT, 2021
** sokoban
** File description:
** input.c
*/
#include "../include/my_sokoban.h"
int is_stuck(map_s *map, vec *box, char **walls)
{
return (
(walls[box->y - 1][box->x] == '#' || walls[box->y + 1][box->x] == '#' ||
exist_comp(map->boxes, map->box_count, box->x, box->y - 1) ||
exist_comp(map->boxes, map->box_count, box->x, box->y + 1)) &&
(walls[box->y][box->x - 1] == '#' || walls[box->y][box->x + 1] == '#' ||
exist_comp(map->boxes, map->box_count, box->x - 1, box->y) ||
exist_comp(map->boxes, map->box_count, box->x + 1, box->y)));
}
int game_end(map_s *map)
{
char **walls = map->walls;
int stuck_boxes = 0;
int good_boxes = 0;
for (int i = 0; i < map->box_count; i++) {
if (is_stuck(map, &map->boxes[i], walls))
stuck_boxes++;
if (exist_comp(
map->targets, map->target_count, map->boxes[i].x, map->boxes[i].y))
good_boxes++;
}
if (good_boxes == map->box_count)
return (0);
if (stuck_boxes == map->box_count)
return (1);
return (-1);
}
void move_box(map_s *map, vec curr, vec new)
{
for (int i = 0; i < map->box_count; i++)
if (map->boxes[i].x == curr.x && map->boxes[i].y == curr.y) {
map->boxes[i].x = new.x;
map->boxes[i].y = new.y;
}
}
void move_elements(map_s *map, map_s *o_map, vec *pl, vec *dir)
{
char box =
exist_comp(map->boxes, map->box_count, pl->x + dir->x, pl->y + dir->y);
if (pl->y + dir->y < map->height &&
map->walls[pl->y + dir->y][pl->x + dir->x] == ' ' && !box)
map->player = (vec){pl->x + dir->x, pl->y + dir->y};
if (box)
if (pl->y + 2 * dir->y < map->height &&
map->walls[pl->y + 2 * dir->y][pl->x + 2 * dir->x] == ' ' &&
!exist_comp(
map->boxes, map->box_count, pl->x + 2 * dir->x, pl->y + 2 * dir->y)) {
map->player = (vec){pl->x + dir->x, pl->y + dir->y};
move_box(map, (vec){pl->x + dir->x, pl->y + dir->y},
(vec){pl->x + 2 * dir->x, pl->y + 2 * dir->y});
}
}
void manage_input(map_s *map, map_s *o_map, int input)
{
vec dir = {0, 0};
vec pl = map->player;
if (input == 32)
return (map_dup(o_map, map, 0));
if (input == KEY_UP)
dir.y = -1;
if (input == KEY_RIGHT)
dir.x = 1;
if (input == KEY_DOWN)
dir.y = 1;
if (input == KEY_LEFT)
dir.x = -1;
if (!dir.x && !dir.y)
return;
move_elements(map, o_map, &pl, &dir);
}
Yes
Debian based
No response
j'ai eu une erreur L4 dans mon stumper sur un return
abricot ne trouve pas l'erreur sur la ligne : return(value)
Il faut en effet laisser un espace entre le return et la valeur retournée.
Merci de réparer cette erreur au plus vite c'est inadmissible
the install when you don't have zsh go boom pls fix asap
Bonjour,
Je me permets d'écrire cette issue suite à un bug rencontré lors de mon utilisation de Abricot-Norminette.
En effet, lors d'une déclaration d'un tableau structure. Abricot-Norminette ma alors trigger une L4 pour rien.
Pas cool, je ne recommande pas.
Cordialement,
Yes
Fedora based
[MINOR] (L4) - Curly brackets misplaced. (src/options.c:65)
![image](https://user-images.githubusercontent.com/47077683/158582358-2dedc82a-d2ca-43fa-a949-1bbbc025a0fe.png)
When I defined an enum without an equal sign, a V1 error appeared telling me that one of my macro should be in uppercase.
All my macros are in uppercase though.
enum STEP_CONNECTION {
USER,
PASS,
LOGGED
};
I decided to display the output of the content on which you detect if a character was in lowercase and inside was my structure definition which has nothing to do with the enum
The line of code which allows to get only the enum is not valid
for macro in enums.replace("enum", "").split("{")[1].replace("}", "").split(","):
Yes
Debian based
‣ In File include/my_ftp.h
[MAJOR] (V1) - Macros should be in Uppercases (include/my_ftp.h:30)
Need a certification for arch based distros
Yes
Yes
il semblerait que lors que j’exécute ./abricot_install
ou sh abricot_install
, l'installation se déroute convenablement cependant une erreur apparaît et je suppose qu'elle peut être problématique.
L'erreur est la suivante :
install_abricot.sh: 32: [[: not found
Le script d'installation marche parfaitement en remplaçant le shebang #!/bin/sh
par #!/bin/bash
Mes spécifications techniques :
OS: Pop!_OS 21.10 x86_64
Host: ZenBook UX534FAC_UX534FA 1.0
Kernel: 5.15.8-76051508-generic
Uptime: 1 day, 3 hours, 47 mins
Packages: 2413 (dpkg), 15 (flatpak)
Shell: zsh 5.8
Resolution: 1920x1080
DE: GNOME 40.5
WM: Mutter
WM Theme: Adwaita
Theme: Orchis-dark [GTK2/3]
Icons: Tela-dark [GTK2/3]
Terminal: gnome-terminal
CPU: Intel i5-10210U (8) @ 4.200GHz
GPU: Intel CometLake-U GT2 [UHD Graph
Memory: 5995MiB / 7749MiB
Taille Caleçon: S
Pourquoi la mouli me trigger une H2 mais pas Abricot ?
sus.
Yes
Debian based, Fedora based, macOS, Windows, Other
bite
Hi there,
I write this number since, while my use of "Apricot", I found an error of the norminette.
Indeed, this report me an L1 (There shoudn't be more than one assignment per line) while the corresponding code is not what the norminette thinks.
Please resolve this issue as soon as possible.
Cordially.
Proofs:
Edit:
Par là aussi ça pète (pour aucune raison c'est juste des protos)
Yes
Fedora based
There shoudn't be more than one assignment per line
il faudrait détécter les structures dans les fonctions monsieur, ce n'est pas trés sérieux
i was in duostumper3 when i saw that i get a minor flag on my include
SHAME i have already made an issue on it and you closed it but it still not fix
pls do it asap thx
Yes
Other
/*
** EPITECH PROJECT, 2021
** header
** File description:
** generic header
*/
#ifndef FILES_H
#define FILES_H
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
char **walk_map(char **map, char *chara);
int check_nbr(char **argv);
void my_putstr(char *str);
int my_itoa_len(int nb);
int my_strlen(char *str);
int my_doubletablen(char **str);
int is_odd_nbr(int nb);
void print_doubletab(char **map);
int still_maxed(char **map);
void repercute(char **map, int j, int i);
void expand(char **map);
void collapse(char **map);
char **str_to_array(char *map, char *stop);
char *map_get(char *path);
char **solving(char **map, int nb_itération);
int error_handling(int argc, char **argv);
int check_map(char **map, char **argv);
char **walk_in_map(char **map, char *chara);
char *my_itoa(int nb);
#endif /*sandpile*/
When I try to install Abricot, the installer tell me "This environment is externally managed"... and Acricot isn't working after this installation.
Yes
Other
_ _ _ _
/ \ | |__ _ __(_) ___ ___ | |_
/ _ \ | '_ \| '__| |/ __/ _ \| __|
/ ___ \| |_) | | | | (_| (_) | |_
/_/ \_\_.__/|_| |_|\___\___/ \__|
=> Erasing old version
[sudo] password for enzo:
=> Done erasing
=> clang-format found
=> Installing checker rules...
Cloning into '/tmp/fruitmixer/remote'...
remote: Enumerating objects: 775, done.
remote: Counting objects: 100% (120/120), done.
remote: Compressing objects: 100% (94/94), done.
remote: Total 775 (delta 49), reused 72 (delta 26), pack-reused 655
Receiving objects: 100% (775/775), 834.46 KiB | 466.00 KiB/s, done.
Resolving deltas: 100% (123/123), done.
=> Installing python dependencies...
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try 'pacman -S
python-xyz', where xyz is the package you are trying to
install.
If you wish to install a non-Arch-packaged Python package,
create a virtual environment using 'python -m venv path/to/venv'.
Then use path/to/venv/bin/python and path/to/venv/bin/pip.
If you wish to install a non-Arch packaged Python application,
it may be easiest to use 'pipx install xyz', which will manage a
virtual environment for you. Make sure you have python-pipx
installed via pacman.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
=> Installation of requirements done
=> Copying source code...
=> Done copying
=> Copying source code into bin...
=> Done copying
=> Installation Done
I'm getting an error from an header not being protected from double inclusions while it is using #pragma once
Yes
Debian based
/*
** EPITECH PROJECT, 2021
** strace
** File description:
** syscalls table
*/
#pragma once
#include "strace.h"
#include <stdlib.h>
When using a macro on a function definition, it's counted as a real function, and await parameters type. Here it wait for a void parameter
Yes
Debian based
void s_global(void)
{
puts("Hello world !");
}
#define g_exit_status s_global() // Trigger F5
Abricot flagged my variable as a G5 despite it is already declared as a const
/*
** EPITECH PROJECT, 2021
** astar
** File description:
** astar.c
*/
#include "../include/astar.h"
const vec orientations[4] = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}};
Yes
macOS
‣ In File solver/src/astar.c
[MINOR] (G4) - Global variable should be const. (solver/src/astar.c:10)
Here's your report:
[MAJOR] : 0 | [MINOR] : 1 | [INFO] : 0
j'ai pas le droit de push c'est chaud
Yes
Other
ERROR: Permission to Just1truc/negAbricot-Norminette.git denied to vavarier.
fatal : Impossible de lire le dépôt distant.
Veuillez vérifier que vous avez les droits d'accès
et que le dnégrôt existe.
pls can you handle H2 asap
Can't use this exquisite program please help
Yes
Fedora based
File "/usr/local/bin/abricot", line 5, in <module>
from program.profile import rules
File "/usr/local/lib/abricot/program/profile.py", line 2, in <module>
import rules
File "/usr/local/lib/abricot/rules/__init__.py", line 1, in <module>
import rules.C_A3 as C_A3
File "/usr/local/lib/abricot/rules/C_A3.py", line 1, in <module>
import abricot
File "/usr/local/lib/abricot/abricot/__init__.py", line 6, in <module>
from abricot.AbricoTokenizer import getTokens, TokenizerObject
File "/usr/local/lib/abricot/abricot/AbricoTokenizer/__init__.py", line 1, in <module>
from abricot.AbricoTokenizer.tokenizer import TokenizerObject, getTokens
File "/usr/local/lib/abricot/abricot/AbricoTokenizer/tokenizer.py", line 9, in <module>
from pcpp import Preprocessor
ModuleNotFoundError: No module named 'pcpp'
you should add a feature allowing to not check gitignored file, like so repos with bonus wont be soil by errors that does not matter
With 2 regex you can do it easily
Yes
Yes
G2 error
C1 bad handled
viens me voir je te montre
...
Bonjour,
Je me permets d'écrire cette issue car, en utilisant Abricot-Norminette. J'ai vu qu'elle ne détecte pas une erreur de coding style.
Bien cordialement,
Yes
Fedora based
No Coding style error detected : Code clean
It would be very useful if the amazing abricot norminette could handle .hs
file !
Yes
Yes
i have this will my code is this
fix asap pls
Yes
Other
#ifndef FILES_H
#define FILES_H
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <ncurses.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <fcntl.h>
#include <time.h>
#include <getopt.h>
static struct option long_options[] = {
{"help", no_argument, 0, 123 },
{"level", required_argument, 0, 'L' },
{"key-left", required_argument, 0, 'l' },
{"key-right", required_argument, 0, 'r' },
{"key-turn", required_argument, 0, 't' },
{"key-drop", required_argument, 0, 'd' },
{"key-quit", required_argument, 0, 'q' },
{"key-pause", required_argument, 0, 'p' },
{"map-size", required_argument, 0, 4269 },
{"without_next", no_argument, 0, 'w' },
{"debug", no_argument, 0, 'D' },
{0, 0, 0, 0 }
};
typedef struct s_tetriomino {
int width;
int height;
int color_code;
char **piece;
char *onlinepiece;
clock_t begin;
int max;
int next;
int level;
int error;
char *name;
char **rotate;
} tetriomino_t;
typedef struct screen {
WINDOW *main;
WINDOW *score;
WINDOW *game;
WINDOW *next;
} screen_t;
typedef struct scoreboard {
int highscore;
int score;
int line;
int level;
} scoreboard_t;
typedef struct arguments {
char help;
int level;
int key_left;
int key_right;
int key_turn;
int key_drop;
int key_quit;
int key_pause;
int map_x;
int map_y;
char without_next;
char debug_mode;
} arguments_t;
typedef struct game {
struct s_tetriomino **s_tetriomino;
struct screen *screen;
struct scoreboard *scoreboard;
struct arguments *arguments;
int **map;
int status;
} game_t;
//autocomplete:start
char *reduce(char *file_name);
void clean_space(char **str, int len, int max);
void clean_rotate(char **actual, tetriomino_t *piece);
int dodge(char *str, int i);
char *is_stared(char *str);
void end_of_display(screen_t *screen);
WINDOW *create_score_window(void);
WINDOW *create_game_window(int map_x, int map_y);
WINDOW *create_next_window(int map_x);
int window_assets(WINDOW *screen);
screen_t *init_display(char without_next, int map_x, int map_y);
void print_case(int x, int y, int color, WINDOW *game);
void switch_color(int *color, int place, WINDOW *game);
void print_map(int **map, WINDOW *game_window, int map_x);
void put_next_tetriomino(WINDOW *next, tetriomino_t *tetriomino);
int put_tetriomino(int **map, tetriomino_t *tetriomino, int x, int y);
int delete_tetriomino(int **map, tetriomino_t *tetriomino, int x, int y);
void display_scoreboard(WINDOW *win, scoreboard_t *scoreboard);
int reset(int *x, int *y, tetriomino_t **tetriomino, int map_x);
int my_strdoublen(char **str);
int is_collapsing(int x, int y, game_t *game, int piece_nb);
int give_piece(int piece);
char *map_get(char *path);
void pars(tetriomino_t *piece, game_t *game);
void set_mapsize(arguments_t *argument);
int parsopt(int val);
void my_puthelp(char *str, char **av);
int switch1(int opt, arguments_t *argument, char **av);
int switch2(int opt, arguments_t *argument);
void parsarg(int ac, char **av, arguments_t *argument);
arguments_t *create_arguments(int ac, char **av);
int **create_map(int x, int y);
void print_line(char *name, int nb);
void debug_keyboard(game_t *game);
void debug_tetriminos(game_t *game);
void free_array(char **str);
void free_tetriminos(game_t *game, tetriomino_t **tetriminos);
void start_debug(game_t *game);
void free_map(int **map);
scoreboard_t *create_scoreboard(void);
void write_new_highscore(int score);
void free_scoreboard(scoreboard_t *scoreboard);
void clean_loop(tetriomino_t *piece, char **newpiece, int i, int j);
char **clean_malloc(tetriomino_t *piece);
void init_struct(tetriomino_t *piece, char *file_name, int i, char *inside);
tetriomino_t *filler(tetriomino_t *piece, struct dirent *diren);
tetriomino_t **fill_struct(game_t *game);
int ending(int x, int y, game_t *game);
int my_structlen(tetriomino_t **tetriomino);
void falling(int *x, int *y, game_t *game);
void keyboard_event(game_t *game, int *x, int *y, int current);
void move_right(int *x, int *y, game_t *game, int current);
void move_left(int *x, int *y, game_t *game, int current);
void move_drop(int *x, int *y, game_t *game, int current);
char **create_new_piece(char **piece, int *x, int *y);
char **rotate_array(char **piece, int *x, int *y);
char **cancel_rotate_array(char **piece, int *x, int *y);
int verify_position(game_t *game, tetriomino_t *tetriomino, int x, int y);
void rotate_piece(tetriomino_t *tetriomino, int *pos_x, int *pos_y, \
game_t *game);
char *give_malloc_str(char *str);
void my_put_nbr(int nb);
void my_putstr2(char **str);
void my_putchar(char c);
void my_putstr(char *str);
int my_itoa_len(int nb);
char *my_itoa(int nb);
int my_strlen(char const *str);
void lining(game_t *game);
int main(int argc, char **argv);
int ft_nb_word(char *str);
int ft_word_len(char *str, int i);
char **my_str_to_word_array(char *str, char *charset);
int main_loop(game_t *game);
game_t *create_game(int ac, char **av);
int start(int ac, char **av);
int init_tetriomino(void);
int my_atoi(char *str);
char *my_strdup(char *src);
char *my_strcat(char *dest, char *src);
int size_dir(void);
void check(tetriomino_t **piece);
void redirect_all_std(void);
//autocomplete:end
#endif
‣ Bad files :
[MAJOR] (O4) - Name not in snake case convention. (Makefile)
Yes
Debian based
No response
Abricot is not working anymore on macOS as cat -A is not a valid option
Yes
macOS
cat: illegal option -- A
usage: cat [-belnstuv] [file ...]
Traceback (most recent call last):
File "/usr/local/lib/Abricot_scripts/brico.py", line 847, in <module>
main()
File "/usr/local/lib/Abricot_scripts/brico.py", line 845, in main
rule.run()
File "/usr/local/lib/Abricot_scripts/brico.py", line 766, in run
self.browse_directory(os.listdir("."), ".")
File "/usr/local/lib/Abricot_scripts/brico.py", line 661, in browse_directory
obj.run(self, paths + "/" + files)
File "/usr/local/lib/Abricot_scripts/brico.py", line 381, in run
result = subprocess.check_output("cat -A "+files, shell=True)
File "/usr/local/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/local/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'cat -A ./test.c' returned non-zero exit status 1.
Bonjour,
J'ai le regret de vous informer que les [L4] Misplaced Curly Brackets ne sont malheureusement pas prisent en compte par votre norminette pour les boucles "do while;".
En effet, votre norminette me signale une L4 sur ma boucle alors que je suis parfaitement en droit et que ce type d'écriture est totalement autorisée au Coding style.
De plus, si vous n'êtes pas satifsait de mes simples phrases pour vous expliquer ce problème. Vous trouverez ci-joint, deux images de preuves.
Merci de mettre à jour votre norminette au plus vite.
Cordialement,
DUBOSCLARD Léo
1ère année (Promotion 2026)
Epitech Lyon
[email protected]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.