All Projects → ronanboiteau → NormEZ

ronanboiteau / NormEZ

Licence: MIT license
Coding-style checker for Epitech students. This program analyzes your C source files for Epitech coding-style violations.

Programming Languages

ruby
36898 projects - #4 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to NormEZ

school21
Как подготовиться к бассйну Школы 21: изучаем терминал, vim, работаем с gcc, norminette, git, пишем первую программу на Си.
Stars: ✭ 41 (-43.84%)
Mutual labels:  norminette
eslint-config
MOXY eslint configuration to be used across several JavaScript projects
Stars: ✭ 14 (-80.82%)
Mutual labels:  coding-style
cscs
A curated list of Coding Style Conventions and Standards.
Stars: ✭ 1,486 (+1935.62%)
Mutual labels:  coding-style
phpcs-psr4-sniff
[READ-ONLY] PHP_CodeSniffer sniff that checks class name matches PSR-4 project structure.
Stars: ✭ 23 (-68.49%)
Mutual labels:  coding-style
eslint-config-javascript
Write bulletproof JavaScript like a pro! 😎
Stars: ✭ 34 (-53.42%)
Mutual labels:  coding-style
dashboard-epitech
A cross-platform Epitech intranet application with awesome features
Stars: ✭ 22 (-69.86%)
Mutual labels:  epitech
Clang
Mirror kept for legacy. Moved to https://github.com/llvm/llvm-project
Stars: ✭ 2,880 (+3845.21%)
Mutual labels:  coding-style
Coding-Standards
Coding Guidelines for C#
Stars: ✭ 125 (+71.23%)
Mutual labels:  coding-style
Swift-Coding-Guidelines
A repository to collect best practices when programming with Swift
Stars: ✭ 17 (-76.71%)
Mutual labels:  coding-style
codingstyle
Java coding style and template project used at Munich university of applied sciences
Stars: ✭ 19 (-73.97%)
Mutual labels:  coding-style
XS-Labs-Style-Guide
XS-Labs Coding Style Guide for C, C++, Objective-C and x86 Assembly
Stars: ✭ 20 (-72.6%)
Mutual labels:  coding-style
OpenStaticAnalyzer
OpenStaticAnalyzer is a source code analyzer tool, which can perform deep static analysis of the source code of complex systems.
Stars: ✭ 19 (-73.97%)
Mutual labels:  coding-style
verilog-coding-style
Verilog (SystemVerilog) coding style
Stars: ✭ 36 (-50.68%)
Mutual labels:  coding-style
Codor
Custom PHPCS sniffs to find Code Smells
Stars: ✭ 40 (-45.21%)
Mutual labels:  coding-style
minilibx
Minilibx for linux systems
Stars: ✭ 19 (-73.97%)
Mutual labels:  epitech
ZiAPI
The elected Zia API for {Epitech} promo 2024 (Paris and Marseille)
Stars: ✭ 29 (-60.27%)
Mutual labels:  epitech
Epitech-Survival-Kit
It contains a part of all the small Epitech projects that are not worth the blows of spending a lot of time
Stars: ✭ 51 (-30.14%)
Mutual labels:  epitech
ft get next line
42 São Paulo - get_next_line
Stars: ✭ 17 (-76.71%)
Mutual labels:  norminette
moulinette-core
FoundryVTT module which provides a set of tools for DMs for managing assets.
Stars: ✭ 22 (-69.86%)
Mutual labels:  moulinette

NormEZ logo

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 et de norme Haskell Epitech dans vos fichers de code source C et Haskell.

Table of contents

Getting started

Requirements

Installing Ruby on Fedora (Epitech's 2017 dump)

sudo dnf install ruby

How to use NormEZ?

  1. Clone the repository:
    git clone https://github.com/ronanboiteau/NormEZ
  2. Run make install to install NormEZ or make uninstall to uninstall it
  3. Run NormEZ:
    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:
    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 = major infraction
Minor infraction = minor infraction

C

Major infraction Lines with too many columns (> 80).
Major infraction Forbidden files: every regular file that does not match Makefile, *.c or *.h (ex: *.o, *.gch, bsq, ...) & that is not mentioned in a .gitignore file located in your current working directory.
Major infraction [Not exhaustive] Too broad filenames (ex: string.c, algo.c, my_algorithm.c, ...).
Major infraction Missing or corrupted header in sources files (.c), headers (.h) & Makefiles.
Major infraction Functions that contain more than 20 lines.
Major infraction Several semicolon-separated assignments on the same line.
Major infraction [Not exhaustive] Forbidden functions (printf(), dprintf(), atoi(), memcpy(), scanf(), strlen()...).
Major infraction Trailing space(s) and/or tabulation(s) at the end of a line.
Major infraction Filenames that don't respect the snake_case naming convention.
Major infraction Condition and assignment on the same line.
Major infraction Directory names that don't respect the snake_case naming convention.
Major infraction Too many functions in file (> 5).
Major infraction Functions with no parameters that don't take void as argument in their declaration.
Major infraction Functions with too many arguments (> 4).
Minor infraction Space(s) in indentation.
Minor infraction Missing space after keyword.
Minor infraction Misplaced pointer symbol(s).
Minor infraction Macros used for constants.
Minor infraction Macros containing multiple assignments.
Minor infraction Too many else if statements.
Minor infraction Misplaced comments.
Minor infraction Missing space after comma.
Minor infraction Missing space around binary or ternary operator (=, ==, !=, <=, >=, &&, ||, +=, -=, *=, /=, %=, &=, ^=, |=, |, ^, >>, <<, >>=, <<=).
Minor infraction Extra space after unary operators (!, sizeof, ++, --).
Minor infraction Forbidden keyword (goto).
Minor infraction Functions must be separated by one and only one empty line in .c files.

Haskell

Major infraction Lines with too many columns (> 80).
Major infraction Functions that contain more than 10 lines.
Major infraction Filenames that don't respect the UpperCamelCase naming convention.
Major infraction Imbedded if blocks.
Major infraction Mutable variables used.
Major infraction Missing type signatures.
Major infraction Useless do.
Minor infraction [Not exhaustive] Guards that should be pattern matching.

To-do

Coding-style violations NOT YET checked by NormEZ.

Major infraction = major infraction
Minor infraction = minor infraction

C

Major infraction Typedef not ending with _t.
Major infraction Identifiers that don't respect the snake_case naming convention.
Major infraction Macros, global constants or enums that don't respect the SNAKE_CASE convention (uppercase snake_case).
Major infraction Function prototypes, typedefs, global variables, macros or static inline functions in .c source files.
Minor infraction Single-letter identifiers shouldn't be named l (lowercase L) or o to avoid confusions.
Minor infraction Nested conditonal branchings (depth > 2).
Minor infraction Header files not protected against double inclusion
Minor infraction Wrong indentation level in .c and .h files.
Minor infraction Wrong indentation level in pre-processor directives.
Minor infraction Extra space between function name and opening parenthesis.
Minor infraction Misplaced curly brackets.
Minor infraction Multiple variables declared on the same line.
Minor infraction Variable not declared at the beginning of function.
Minor infraction Missing empty line after variable declarations.
Minor infraction Extra empty lines in function.

Haskell

Major infraction Naming identifiers according to the lowerCamelCase convention.
Major infraction Forbidden language extentions.
Major infraction 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.
  • 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.

Getting involved

Share

  • Enjoying NormEZ? Leave it a star 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 NormEZ
  2. Commit & push a new feature to the forked repository
  3. Open a pull request so I can merge your work into this repository :)

Contributors

Here is the list of NormEZ's contributors. Thanks to everyone who helped developing this project!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].