Coder Social home page Coder Social logo

just1truc / abricot-norminette Goto Github PK

View Code? Open in Web Editor NEW
47.0 2.0 7.0 347 KB

Abricot Norminette is meant for EPITECH Projects. [ PROMO 2026 ]

License: MIT License

Python 95.02% Shell 4.85% Dockerfile 0.14%
abricot epitech norme norminette python 2026 best coding-style testing lyon

abricot-norminette's Introduction

Abricot Reborn

During your projects you may be tempted to quickly and intuitively check your style mistakes thanks to a tool called Automated Beautiful Recursive Integrated Coding Omissions Tracker, better known as Abricot

More seriously, the Abricot development team has been thinking for some time about a more modern and more stable implementation of the norminette. This new year for Epitech is an opportunity to make it compliant with current coding style rules.

Installation

Because we wanted to stay simple, there is one and only command to install Abricot:

curl https://raw.githubusercontent.com/Just1truc/Abricot-Norminette/main/get_abricot.sh | sh

Imagine having to pull a docker image to run a norminette... 😒

Usage

We wanted to make Abricot usable at any time, without requesting superuser permissions and without creating intermediate files polluting your workspace.

You can launch a deep analysis with Abricot with the following simple command:

abricot

You can also take a look at all the additional features implemented with:

abricot -h

Updating

Updates are regulary made.
To keep Abricot up-to-date, please use the following command :

abricot --update

Checked files

Here are the files affected by Abricot's style check:

C Source Files (*.c)

C Header Files (*.h)

Makefiles

Abricot also looks for unwanted files in the repository...

Handled rules

Severities:

  • MAJOR
  • MINOR
  • INFO

Global scope

  • C-G1 Bad file header
  • C-G2 There should be only one line between each fonction
  • C-G3 Preprocessor directive must be indented
  • C-G4 Global Variable must be const
  • C-G5 #include should only contain .h files
  • C-G6 Line endings must be done in UNIX style
  • C-G7 Line should finish only end with a "\n"
  • C-G8 Trailing space
  • C-G9 Constant values

Control structure

  • C-C1 There should not be more than 3 depth (conditionnal branching)
  • C-C3 Forbidden goto

Advanced

  • C-A3 Missing Line Break

Layout inside a function scope

  • C-L1 Coding content
  • C-L2 Bad indentation
  • C-L3 Misplaced spaces
  • C-L4 Misplaced curly bracket
  • C-L5 Bad variable declaration
  • C-L6 Bad line break

Files organization

  • C-O1 Check useless file
  • C-O3 Too many fonctions in a file
  • C-O4 Snake case convention

Functions

  • C-F3 A line lenght shoud not exceed 80 columns
  • C-F4 A function should not exceed 20 lines
  • C-F5 More than 4 arguments in a function or argumentless function
  • C-F6 Comments inside of functions

Header files

  • H2 Header not protected from doucle inclusion

Variables and Types

  • V1 Controlling structures and macros
  • V3 Pointers position

Performances

Another really important point for us is performance.

Abricot Norminette uses multi-threading, a smart caching policy and is regularly profiled in search of optimization opportunities.

Here's a small report of what we got as benchmark:

On a ~20 files project:

🍑 Abricot 🍌 Banana
0.73s 2.67s

On a ~30 files project:

🍑 Abricot 🍌 Banana
0.98s 5,38s

On a ~50 files project:

🍑 Abricot 🍌 Banana
2.09s 2m01s

Banana reported 0 coding style errors on this project

Compatibility

Python3+ should be installed on your computer for Abricot to work.

OS Compatible ?
Debian based
Fedora based
macOS
Windows ⚠️ WSL advised

Credits

Lead Developper : Justin Duc

linkeding bage git hub bage mail

Architecture Designer : Mathias André

linkeding bage git hub bage mail

Performances Responsible : Valentin Nouri

linkeding bage git hub bage mail

Quality Responsible : Thomas Mazaud

linkeding bage git hub bage mail

Tests Maker : Baptiste Leroyer

linkeding bage git hub bage mail

abricot-norminette's People

Contributors

501stecho avatar ardorax avatar bqleine avatar davphla avatar fyroeo avatar just1truc avatar mathidev avatar mikaelvallenet avatar vavarier avatar zipleix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

abricot-norminette's Issues

03 - inline static struct added in the function total number

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"}};

[BUG]: Cant install Abricot on manjaro linux

What happened?

When I try to install Abricot, the installer tell me "This environment is externally managed"... and Acricot isn't working after this installation.

Version

Yes

What OS are you seeing the problem on?

Other

Relevant output

_    _          _           _   
    / \  | |__  _ __(_) ___ ___ | |_ 
   / _ \ | '_ \| '__| |/ __/ _ \| __|
  / ___ \| |_) | |  | | (_| (_) | |_ 
 /_/   \_\_.__/|_|  |_|\___\___/ \__|
                                  
=> 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

[BUG]: H2

What happened?

Pourquoi la mouli me trigger une H2 mais pas Abricot ?

sus.

Version

Yes

What OS are you seeing the problem on?

Debian based, Fedora based, macOS, Windows, Other

Relevant output

bite

[REQUEST]: Handling F2 and V1

What would you like to be added ?

With 2 regex you can do it easily

Version

Yes

Did you check your request is not already asked ?

Yes

install

the install when you don't have zsh go boom pls fix asap

[BUG]: ModuleNotFoundError: No module named 'pcpp' on macOS

What happened?

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 :

  1. Get the site-packages path from the pip install pcppcommand. Mine is /usr/local/lib/python3.10/site-packages
  2. Create an alias for your terminal environnement to specify the PYTHONPATH to the site-packages path when using abricot. For example, since I am on ZSH, I added to my .zshrc the following line: 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...

Version

Yes

What OS are you seeing the problem on?

macOS

Relevant output

No response

[BUG]: G4 inexistant detected

What happened?

Une erreur G4 a été detectée dans mon programme mais elle se trouve dans le "sys/stat.h". Voici quelques screens !
image

image

Version

Yes

What OS are you seeing the problem on?

Fedora based

Relevant output

No response

abricot goes on gitignored files

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

[BUG]: Installation pcpp module

What happened?

Can't use this exquisite program please help

Version

Yes

What OS are you seeing the problem on?

Fedora based

Relevant output

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'

[BUG]: Not working on macOS

What happened?

Abricot is not working anymore on macOS as cat -A is not a valid option

Version

Yes

What OS are you seeing the problem on?

macOS

Relevant output

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.

[BUG]: [H2] bad handling

What happened?

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

Version

Yes

What OS are you seeing the problem on?

Other

Relevant output

/*
** 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*/

[BUG]: H2 act like a weirdo

What happened?

image
i have this will my code is this
image
image
fix asap pls

Version

Yes

What OS are you seeing the problem on?

Other

Relevant output

#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

[BUG]: L4 (Misplaced curly brackets) error

What happened?

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,

Preuves:
image

Version

Yes

What OS are you seeing the problem on?

Fedora based

Relevant output

[MINOR] (L4) - Curly brackets misplaced. (src/options.c:65)
![image](https://user-images.githubusercontent.com/47077683/158582358-2dedc82a-d2ca-43fa-a949-1bbbc025a0fe.png)

J'ai une mineure dans mon stumper à cause de ça

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

L4 Misplaced Curly Brackets on "do while;" unsupported

L4 Misplaced Curly Brackets

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]

Preuves

image
image

[BUG]: No trigger coding style error (if)

What happened?

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,

Preuves:
image
image

Version

Yes

What OS are you seeing the problem on?

Fedora based

Relevant output

No Coding style error detected : Code clean

[BUG]: H2 - Pragma once not handled

What happened?

I'm getting an error from an header not being protected from double inclusions while it is using #pragma once

Version

Yes

What OS are you seeing the problem on?

Debian based

Relevant output

/*
** EPITECH PROJECT, 2021
** strace
** File description:
** syscalls table
*/

#pragma once

    #include "strace.h"
    #include <stdlib.h>

[BUG]: F5 - Macro function definition count as real function

What happened?

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

Version

Yes

What OS are you seeing the problem on?

Debian based

Relevant output

void s_global(void)
{
    puts("Hello world !");
}
#define g_exit_status s_global() // Trigger F5

[BUG]: H2 de ces morts

What happened?

Bite H2 ça marche pas

Crève en fait je sais pas ce que c'est qu'une h2 la mouli m'en trigger une mais pas Abricot.

image
image

Version

Yes

What OS are you seeing the problem on?

Debian based, Fedora based, macOS, Windows, Other

Relevant output

bah du coup Abricot trigger rien :/

[BUG]: G2 not found

What happened?

/*
** 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);
}

Version

Yes

What OS are you seeing the problem on?

Debian based

Relevant output

No response

[BUG]: MAKEFILE NOT IN SNAKECASE

What happened?

‣ Bad files :
  [MAJOR] (O4) - Name not in snake case convention. (Makefile)

Version

Yes

What OS are you seeing the problem on?

Debian based

Relevant output

No response

[BUG]: V1 - Enum without equal sign results in a V1 error

What happened?

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(","):

Version

Yes

What OS are you seeing the problem on?

Debian based

Relevant output

‣ In File include/my_ftp.h
  [MAJOR] (V1) - Macros should be in Uppercases (include/my_ftp.h:30)

H1 error

il faudrait détécter les structures dans les fonctions monsieur, ce n'est pas trés sérieux

[BUG]: push

What happened?

j'ai pas le droit de push c'est chaud

Version

Yes

What OS are you seeing the problem on?

Other

Relevant output

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.

[REQUEST]: Haskell support

What would you like to be added ?

It would be very useful if the amazing abricot norminette could handle .hs file !

Version

Yes

Did you check your request is not already asked ?

Yes

[BUG]: G4: Flagged despite the variable being a const

What happened?

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}};

Version

Yes

What OS are you seeing the problem on?

macOS

Relevant output

‣ 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

[BUG]: You can ignore Jenkins files

What happened?

image

Epitech's norminette doesn't report "**/Jenkinsfile" so you can ignore it !

Version

Yes

What OS are you seeing the problem on?

Debian based

Relevant output

No response

Error on UBUNTU INSTALL

Bonjour,

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

[BUG]: "There shoudn't be more than one assignement per line" error

What happened?

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:

image
image

Edit:

Par là aussi ça pète (pour aucune raison c'est juste des protos)
image
image

Version

Yes

What OS are you seeing the problem on?

Fedora based

Relevant output

There shoudn't be more than one assignment per line

[BUG]: Folders into include folder

What happened?

The folders into the include folder is reported as a G6 error.

Version

Yes

What OS are you seeing the problem on?

Debian based

Relevant output

No response

[BUG]: L6 & L5 & L6 & G2

What happened?

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 ?

Version

Yes

What OS are you seeing the problem on?

Debian based

Relevant output

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.