Coder Social home page Coder Social logo

customentity / crnormz Goto Github PK

View Code? Open in Web Editor NEW
24.0 2.0 0.0 2.77 MB

The best coding-style checker for Epitech students.

License: MIT License

Crystal 51.36% Shell 3.62% C 39.51% Makefile 1.64% Python 3.86%
2026 c coding-style crystal epitech montpellier norme norminette projects tool

crnormz's Introduction


logo
crNormz

The most awesome norminette made using Crystal.

APM GitHub issues Discord GitHub release

Project DescriptionInstallationHow to useFeaturesBenchmarksCredits

project.gif

Project Description

crNormz is a norm checking program developed using Crystal so that students can check for compliance with the EPITECH standard. This linter is currently the fastest, most reliable and most accurate, see Benchmarks

Installation

To clone and run this application, you'll need Git installed on your computer. From your command line:

# Clone this repository
$ git clone https://github.com/CustomEntity/crNormz

# Go into the repository
$ cd crNormz

# Install the norminette
$ sudo ./crnormz_installer.sh

How to use

# Show help
$ crnormz -h

Usage: crnormz [-fgtlh]
    -f, --ignore-file=               Ignore file from the checker
    -g, --ignore-function=           Ignore forbidden functions
    -t, --ignore-type=               Ignore errors of a specific type
    -l, --ignore-level=              Ignore errors of a specific level (Major, Minor or Info)
    -r, --raw-output                 Enables easy parsing for applications
    -h, --help                       Show this help

# Run the norminette
$ crnormz

# Run the norminette excludind all .o files
$ crnormz -f "*.o"

# Run the norminette without checking the forbidden functions (printf and scanf)
$ crnormz -g "printf,scanf"

# Run the norminette excluding all O1 rules
$ crnormz -t "O1"

# Run the norminette excluding all info level rules
$ crnormz -l "info"

# Sort files alphabetically
$ crnormz -s

# Run the norminette without text formatting
$ crnormz -r

Features

⚠️ crNormz does not support comments and quotes at the moment

Type Description State
O1 Useless file for compilation
O2 Invalid .c file source code 🔨
O3 Too many functions in a file (> 5 functions)
O4 File name not in snake_case
G1 EPITECH header not found or invalid
G2 Functions must be separated by a single line
G3 Preprocessor directives must be indented according to the level of indirection
G4 Global variable not constant 🔨
G5 Static global variables and functions 🔨
G6 Include directive should only include header .h files
G7 Line endings must be done in UNIX style (with \n)
G8 No trailing spaces must be present at the end of a line
G9 No more than 1 trailing empty line must be present
F2 Function name not in snake_case
F3 Too many columns (> 80 columns)
F4 Too many lines in function (> 20 lines)
F5 Too many parameters in function (> 4 parameters)
F5 Missing 'void' parameter in case of function without arguments
F6 Comments within a function
F7 Nested functions 🔨
L1 Multiple assignments on the same line
L2 Bad indentation
L3 Missing space after a keyword 🔨
L4 Misplaced bracket
L6 Line jumps
V1 The type names defined with typedef should end with _t
V1 All identifier names should be according to the snake_case convention
V1 The names of macros should be written in UPPER_CASE
V1 The content of enums should be written in UPPER_CASE
V3 Pointer badly positioned
C1 Too much code depth (> 2 levels)
C3 Goto keyword
H1 Source code in header file vice versa
H3 Macro should match only one statement
A3 File should end with a line break
Forbidden function 🔨

Benchmarks

These benchmarks were performed on a project in real use with 225 source files, 30 header files and 1 Makefile.

Norminette Time, s Major Minor Info
Epitech National N/A 473 59 49
👑 crNormz 0.550 481 84 49
Abricot 7.302 99 228 48
JankunNorme 1.274 259 209 48
Bubulle 10.763 27 22 49

Credits

crnormz's People

Contributors

customentity 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

Watchers

 avatar  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.