Coding-style checker for Epitech students. This program analyzes your C source files for Epitech coding-style violations.
[French] Moulinette de norme pour les étudiants d'Epitech. Cette norminette cherche des erreurs de norme Epitech dans vos fichers de code source C.
Table of contents
- Getting started
- Getting involved
Installing Ruby on Fedora (Epitech's dump 2017)
sudo dnf install ruby
How to use NormEZ?
- Clone the repository:
git clone https://github.com/ronanboiteau/NormEZ
- Copy the
NormEZ.rbexecutable in your project repository.
- Run NormEZ:
- NormEZ will recursively search for
.hfiles to analyze in your current directory.
- Install NormEZ:
yaourt -S normez
- Run NormEZ with the following command:
--no-update: don't check for NormEZ updates
--ignore-files: ignore forbidden files
--ignore-functions: ignore forbidden functions
--ignore-all: ignore forbidden files & forbidden functions (same as
--colorless: disable all styling on output
Here are the Epitech coding-style violations checked by NormEZ.
Lines with too many columns (> 80).
Forbidden files: every regular file that does not match
bsq, ...) & that is not mentioned in a
.gitignore file located in your current working directory.
[Not exhaustive] Too broad filenames (ex:
Missing or corrupted header in sources files (
.c), headers (
Functions that contain more than 20 lines.
Several semicolon-separated assignments on the same line.
[Not exhaustive] Forbidden functions (
Trailing space(s) and/or tabulation(s) at the end of a line.
Filenames that don't respect the snake_case naming convention.
Condition and assignment on the same line.
Directory names that don't respect the snake_case naming convention.
Too many functions in file (> 5).
Functions with no parameters that don't take void as argument in their declaration.
Functions with too many arguments (> 4).
Space(s) in indentation.
Missing space after keyword.
Misplaced pointer symbol(s).
Macros used for constants.
Macros containing multiple assignments.
else if statements.
Missing space after comma.
Missing space around binary or ternary operator (
Extra space after unary operators (
Forbidden keyword (
Functions must be separated by one and only one empty line in
Here are the Epitech coding-style violations NOT YET checked by NormEZ.
Typedef not ending with
Identifiers that don't respect the snake_case naming convention.
Macros, global constants or enums that don't respect the SNAKE_CASE convention (uppercase snake_case).
Function prototypes, typedefs, global variables, macros or static inline functions in
.c source files.
Single-letter identifiers shouldn't be named
o to avoid confusions.
Nested conditonal branchings (depth > 2).
Header files not protected against double inclusion
Wrong indentation level in
Wrong indentation level in pre-processor directives.
Extra space between function name and opening parenthesis.
Misplaced curly brackets.
Multiple variables declared on the same line.
Variable not declared at the beginning of function.
Missing empty line after variable declarations.
Extra empty lines in function.
- NormEZ doesn't make the difference between strings/comments & code. Examples: a commented forbidden function will be flagged, as well as a commented
;(multiple assignments on the same line), etc.
- The check for functions containing more than 20 lines doesn't work yet with the new coding style v3.1. See related issue.
Report a bug
If you found a bug that isn't listed above in as a known issue, feel free to create a GitHub issue.
- Enjoying NormEZ? Leave it a star to show your support :)
- And share the link to this repository with your friends at Epitech!
You want to add awesome features to NormEZ? Here's how:
- Fork NormEZ
- Commit & push a new feature to the forked repository
- Open a pull request so I can merge your work into this repository :)
Here is the list of NormEZ's contributors. Thanks to everyone who helped developing this project!