Package: normatrix
NorMatrixcheck some norm for youinstallwith pipyWith Pipy1if you want some "stable" version:pipinstallnormatrixif you want the most update to date version:pipinstallgit+https://github.com/Saverio976/NorMatrix.gitNow you can use it withpython3 -m normatrixin your terminal2And if you want to just writenormatrix:echo$SHELLif you are using bash shell (theechoprint/something/bash):echoaliasnormatrix=\"python3-mnormatrix\">>$HOME/.bashrcelse if you are using zsh shell (theechoprint/something/like/zsh):echoaliasnormatrix=\"python3-mnormatrix\">>$HOME/.zshrcelse if you are using fish shell (theechoprint/something/like/fish):abbr--add'normatrix''python3 -m normatrix'else handle this yourself bruh;3to update it, you just have to runpipinstall-Unormatrix4to uninstall it (sad), runpipuninstallnormatrixfrom sourceFrom source1gitclonehttps://github.com/Saverio976/NorMatrix.gitcdNorMatrixNow you can use it with./path/to/folder/NorMatrix/main.pyin your terminal2And if you want to just writenormatrix:echo$SHELLif you are using bash shell (theechoprint/something/bash):echoaliasnormatrix=\"$PWD/main.py\">>$HOME/.bashrcelse if you are using zsh shell (theechoprint/something/like/zsh):echoaliasnormatrix=\"$PWD/main.py\">>$HOME/.zshrcelse handle this yourself bruh;3to update it, just go where you have cloned normatrix
rungitpull4to uninstall it (sad)
Delete the folderCurrent Checks80 cols per linespace/tab alone (in a line)/(at the end of line)two newline at end of filetwo newline between function (between all buf chhhtt)libc function call (pr welcome to add some libc function always banned)nested branch more than 3 branchno more than 20 lines per functioncomma with no space afterend of parenthesis with a open curly bracket next){star char*like thischar* bufpreprocessors indentations (#if..,#endif)multiple statements5 functions per filefilename of source code only snake_caseno line break at end of file5+5 7/9 that need a space (but some false positiv goes in)no space after [ and space  before ]header#define in .cmake + check exe if the compiler add some banned function...doc(if you use pipy) python -m normatrix(if you use pipy) python -m normatrixusage:python-mnormatrix[-h][--no-operators-pluggin][--preview][--conf][--only-errors][--no-fclean][--link-line][--tests-run][--outputformat][paths...]TheCEpitechCodingStyleNormChecker

positionalarguments:pathslistofpathtocheck(default:thecurrentworkingdirectory)options:-h,--helpshowthishelpmessageandexit--no-operators-plugginremovetheoperatorspluggin(becauseitprintsomefalsepositivfornow)--previewaddsomepluginthatareaddedrecently--conf[deprecated][nowitcheckalwaysforthefile]tellsifyouhavea.normatrixconfigfile--only-errorsprintonlybadfileswitherrors--no-fcleanifyouwantnormatrixdontdoa"make fclean"attheend--link-linetohavethe"link"tothefile(invscodeterminalyoucanclickitanditwillopenthefileatthelineoftheerror)--tests-runruntheunittestsfornormatrix--outputformattellwhichoutputformattouse[html,md,term_color,term_rich];forhtmlthefileisnormatrix-result.htlm;formdthefileisnormatrix-result.md(only from source) main.py(only from source) main.pyusage:./main.py[-h][--no-operators-pluggin][--preview][--conf][--only-errors][--no-fclean][--link-line][--tests-run][--outputformat][paths...]TheCEpitechCodingStyleNormChecker

positionalarguments:pathslistofpathtocheck(default:thecurrentworkingdirectory)options:-h,--helpshowthishelpmessageandexit--no-operators-plugginremovetheoperatorspluggin(becauseitprintsomefalsepositivfornow)--previewaddsomepluginthatareaddedrecently--conf[deprecated][nowitcheckalwaysforthefile]tellsifyouhavea.normatrixconfigfile--only-errorsprintonlybadfileswitherrors--no-fcleanifyouwantnormatrixdontdoa"make fclean"attheend--link-linetohavethe"link"tothefile(invscodeterminalyoucanclickitanditwillopenthefileatthelineoftheerror)--tests-runruntheunittestsfornormatrix--outputformattellwhichoutputformattouse[html,md,term_color,term_rich];forhtmlthefileisnormatrix-result.htlm;formdthefileisnormatrix-result.md(only from source) exec.sh(only from source) exec.sh(this file exists only to keep compatibility to older version)usage:./main.py[-h][--no-operators-pluggin][--preview][--conf][--only-errors][--no-fclean][--link-line][--tests-run][--outputformat][paths...]TheCEpitechCodingStyleNormChecker

positionalarguments:pathslistofpathtocheck(default:thecurrentworkingdirectory)options:-h,--helpshowthishelpmessageandexit--no-operators-plugginremovetheoperatorspluggin(becauseitprintsomefalsepositivfornow)--previewaddsomepluginthatareaddedrecently--conf[deprecated][nowitcheckalwaysforthefile]tellsifyouhavea.normatrixconfigfile--only-errorsprintonlybadfileswitherrors--no-fcleanifyouwantnormatrixdontdoa"make fclean"attheend--link-linetohavethe"link"tothefile(invscodeterminalyoucanclickitanditwillopenthefileatthelineoftheerror)--tests-runruntheunittestsfornormatrix--outputformattellwhichoutputformattouse[html,md,term_color,term_rich];forhtmlthefileisnormatrix-result.htlm;formdthefileisnormatrix-result.md(only from source) Makefile(only from source) Makefile (deprecated)(this file exists only to keep compatibility to older version)
(if you can, move to another choice)USAGE:make-Cpath/to/NorMatrixPATH_CHECK=$PWDDESCRIPTION:checkthenorm!inthecurrentworkingdirectory(callmain.py)ARGS:-Cpath/to/NorMatrixrunthemakefilethatisinpath/to/NorMatrixinsteadoftheonewhereyouarePATH_CHECK=$PWDcheckthenorminyourcurrentworkingdirectoryconfigurationyou can now configure what functions are banned, and what are not,
you can now configure what extension file are banned, and what are not,all you have to do is put a file.normatrix.jsonwhere you executenormatrixexample with nothing banned and no preview (preview = not stable check) check.normatrix.json{"banned":[],"no-banned":[],"extension":[],"no-extension":[],"enable-preview":false}just add inside[]the string of what you wantother explanation with exampleother explanation with exampleto no-banne memset (because you can use it){"no-banned":["memset"]}to ban my_printf (because you dont want to use it){"banned":["my_printf"]}to no-banne *.o file (because you dont need this warning){"no-extension":["*.o"]}to banne *.c file (because you want c file banned){"extension":["*.c"]}to enable preview check by default{"enable-preview":true}by default there are somthing like this:{"banned":["printf","memset","strcpy","strcat","calloc"],"no-banned":[],"extension":["*.a","*.o","*.so",".gch","*~","*#","*.d"],"no-extension":[],"enable-preview":false}this configuration will be added even if you add a.normatrix.jsonfilebut if you want to remove*.o, just add it to theno-extensionor you can put*.oin a.gitignoreit will remove it from the defaultRun as agithub workflowthis is not the latest normatrix but :link :linkstate :(N.B. : this workflow pass well, but it will not if you copy the code below)in the repo root :mkdir.github
mkdir.github/workflowsecho'name: NorMatrix Checkon: [push]jobs:norm:runs-on: ubuntu-lateststeps:- uses: actions/checkout@v2- name: set up pythonuses: actions/setup-python@v2with:python-version: '3.9'- name: clone NorMatrixrun: pip install git+https://github.com/Saverio976/NorMatrix.git- name: NorMatrixrun: python3 -m normatrix --only-errors'>.github/workflows/normatrix_check.ymlyou can push the modification to githubContribute[more information onCONTRIBUTNG.md]AlternativescrNormzAbricot-Norminettejankun_normeBubulle-NorminetteNormEZThankschempa for his sample of file that dont follow the epitech normand invisble testers that says"bha baah normatrix have a bug"ContributorsXavier Mitaultapps/github-actionsMizumE0wChristophe CHHOR