Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ronanboiteau/NormEZ
Coding-style checker for Epitech students. This program analyzes your C source files for Epitech coding-style violations.
https://github.com/ronanboiteau/NormEZ
coding-style epitech moulinette norme norminette
Last synced: 3 days ago
JSON representation
Coding-style checker for Epitech students. This program analyzes your C source files for Epitech coding-style violations.
- Host: GitHub
- URL: https://github.com/ronanboiteau/NormEZ
- Owner: ronanboiteau
- License: mit
- Created: 2017-12-17T12:33:35.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-03-14T10:41:02.000Z (almost 3 years ago)
- Last Synced: 2023-05-16T18:55:13.513Z (almost 2 years ago)
- Topics: coding-style, epitech, moulinette, norme, norminette
- Language: Ruby
- Homepage:
- Size: 1.14 MB
- Stars: 73
- Watchers: 3
- Forks: 20
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-epitech - NormEZ - A norminette for C projects. (Epitech Tools / Language related)
- awesome-epitech - NormEZ - A norminette for C projects. (Epitech Tools / Language related)
README
[
](https://github.com/ronanboiteau/NormEZ)
Coding-style checker for Epitech students. This program analyzes your C and Haskell source files for [Epitech C coding-style] and [Epitech Haskell coding-style] violations.
*[French] Moulinette de norme pour les étudiants d'Epitech. Cette norminette cherche des erreurs de [norme C Epitech][Epitech C coding-style] et de [norme Haskell Epitech][Epitech Haskell coding-style] dans vos fichers de code source C et Haskell.*
## Table of contents
* __[Getting started](#getting-started)__
* [Requirements](#requirements)
* [How to use NormEZ?](#how-to-use-normez)
* __[Options](#options)__
* __[Features](#features)__
* __[To-do](#to-do)__
* __[Bugs](#bugs)__
* [Known issues](#known-issues)
* [Report a bug](#report-a-bug)
* __[Getting involved](#getting-involved)__
* [Share](#share)
* [Contribute](#contribute)
* [Contributors](#contributors)## Getting started
### Requirements
- [Ruby](https://www.ruby-lang.org/en/)
#### Installing Ruby on Fedora (Epitech's 2017 dump)
```sh
sudo dnf install ruby
```### How to use NormEZ?
1. Clone the repository:
```sh
git clone https://github.com/ronanboiteau/NormEZ
```
2. Run `make install` to install NormEZ or `make uninstall` to uninstall it
3. Run NormEZ:
```sh
normez
```
4. NormEZ will recursively search for `.c` and `.h` files to analyze in your current directory.
5. You can also pass specific files to check as argument:
```sh
normez src/*.c src/*.h
```## Options
- `-u` or `--no-update`: don't check for NormEZ updates
- `-f` or `--ignore-files`: ignore forbidden files
- `-m` or `--ignore-functions`: ignore forbidden functions
- `-i` or `--ignore-all`: ignore forbidden files & forbidden functions (same as `-fm`)
- `-c` or `--colorless`: disable all styling on output## Features
Coding-style violations checked by NormEZ.
= major infraction
= minor infraction
### C
Lines with too many columns (> 80).
Forbidden files: every regular file that does not match `Makefile`, `*.c` or `*.h` (ex: `*.o`, `*.gch`, `bsq`, ...) & that is not mentioned in a [`.gitignore`](https://git-scm.com/docs/gitignore) file located in your current working directory.
*[Not exhaustive]* Too broad filenames (ex: `string.c`, `algo.c`, `my_algorithm.c`, ...).
Missing or corrupted header in sources files (`.c`), headers (`.h`) & `Makefile`s.
Functions that contain more than 20 lines.
Several semicolon-separated assignments on the same line.
*[Not exhaustive]* Forbidden functions (`printf()`, `dprintf()`, `atoi()`, `memcpy()`, `scanf()`, `strlen()`...).
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.
Too many `else if` statements.
Misplaced comments.
Missing space after comma.
Missing space around binary or ternary operator (`=`, `==`, `!=`, `<=`, `>=`, `&&`, `||`, `+=`, `-=`, `*=`, `/=`, `%=`, `&=`, `^=`, `|=`, `|`, `^`, `>>`, `<<`, `>>=`, `<<=`).
Extra space after unary operators (`!`, `sizeof`, `++`, `--`).
Forbidden keyword (`goto`).
Functions must be separated by *one and only one* empty line in `.c` files.
### Haskell
Lines with too many columns (> 80).
Functions that contain more than 10 lines.
Filenames that don't respect the [UpperCamelCase](https://en.wikipedia.org/wiki/Camel_case) naming convention.
Imbedded `if` blocks.
Mutable variables used.
Missing type signatures.
Useless `do`.
*[Not exhaustive]* Guards that should be pattern matching.
## To-do
Coding-style violations ***NOT YET*** checked by NormEZ.
= major infraction
= minor infraction
### C
Typedef not ending with `_t`.
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 `l` (lowercase `L`) or `o` to avoid confusions.
Nested conditonal branchings (depth > 2).
Header files not protected against double inclusion
Wrong indentation level in `.c` and `.h` files.
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.
### Haskell
Naming identifiers according to the [lowerCamelCase](https://en.wikipedia.org/wiki/Camel_case) convention.
Forbidden language extentions.
Contents of delivery folder
## Bugs
### Known issues
- 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.](https://github.com/ronanboiteau/NormEZ/issues/20)
- For Haskell, the check of guards that should be expressed as pattern matching is not very accurate, it flags guards that use only direct comparisons (or `==`)### 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](https://github.com/ronanboiteau/NormEZ/issues).
## Getting involved
### Share
- Enjoying NormEZ? Leave it [a star](https://github.com/ronanboiteau/NormEZ/stargazers) to show your support :)
- And share the link to this repository with your friends at Epitech!### Contribute
You want to add awesome features to NormEZ? Here's how:
1. [Fork](https://github.com/ronanboiteau/NormEZ/network/members) NormEZ
2. Commit & push a new feature to the forked repository
3. Open a [pull request](https://github.com/ronanboiteau/NormEZ/pulls) so I can merge your work into this repository :)### Contributors
[Here](https://github.com/ronanboiteau/NormEZ/graphs/contributors) is the list of NormEZ's contributors. Thanks to everyone who helped developing this project!
[Epitech C coding-style]: /epitech_coding_styles_pdf/epitech_c_coding_style.pdf
[Epitech Haskell coding-style]: /epitech_coding_styles_pdf/epitech_haskell_coding_style.pdf
[snake_case]: https://en.wikipedia.org/wiki/Snake_case