Skip to content

Repository files navigation


logo
crNormz

The most awesome norminette made using Crystal.

APMGitHub issuesDiscordGitHub 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

TypeDescriptionState
O1Useless file for compilation
O2Invalid .c file source code🔨
O3Too many functions in a file (> 5 functions)
O4File name not in snake_case
G1EPITECH header not found or invalid
G2Functions must be separated by a single line
G3Preprocessor directives must be indented according to the level of indirection
G4Global variable not constant🔨
G5Static global variables and functions🔨
G6Include directive should only include header .h files
G7Line endings must be done in UNIX style (with \n)
G8No trailing spaces must be present at the end of a line
G9No more than 1 trailing empty line must be present
F2Function name not in snake_case
F3Too many columns (> 80 columns)
F4Too many lines in function (> 20 lines)
F5Too many parameters in function (> 4 parameters)
F5Missing 'void' parameter in case of function without arguments
F6Comments within a function
F7Nested functions🔨
L1Multiple assignments on the same line
L2Bad indentation
L3Missing space after a keyword🔨
L4Misplaced bracket
L6Line jumps
V1The type names defined with typedef should end with _t
V1All identifier names should be according to the snake_case convention
V1The names of macros should be written in UPPER_CASE
V1The content of enums should be written in UPPER_CASE
V3Pointer badly positioned
C1Too much code depth (> 2 levels)
C3Goto keyword
H1Source code in header file vice versa
H3Macro should match only one statement
A3File 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.

NorminetteTime, sMajorMinorInfo
Epitech NationalN/A4735949
👑 crNormz0.5504818449
Abricot7.3029922848
JankunNorme1.27425920948
Bubulle10.763272249

Credits

About

The best coding-style checker for Epitech students.

Topics

Resources

Stars

23 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages