Code Monkey home page Code Monkey logo

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

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

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.