check epitech c coding style
Project description
NorMatrix
check some norm for you
install:
with pipy
pip install normatrix
echo $SHELL
if you are using bash shell (the echo
print /something/bash):
echo alias normatrix="python -m normatrix" >> $HOME/.bashrc
else if you are using zsh shell (the echo
print /something/like/zsh):
echo alias normatrix="python -m normatrix" >> $HOME/.zshrc
else handle this yourself bruh;
now you can just write normatrix
on your shell
from source:
git clone https://github.com/Saverio976/NorMatrix.git
cd NorMatrix
echo $SHELL
if you are using bash shell (the echo
print /something/bash):
echo alias normatrix="$PWD/main.py" >> $HOME/.bashrc
else if you are using zsh shell (the echo
print /something/like/zsh):
echo alias normatrix="$PWD/main.py" >> $HOME/.zshrc
else handle this yourself bruh;
now you can just write normatrix
on your shell
Current Checks :
- 80 cols per line
- space/tab alone (in a line)/(at the end of line)
- two newline at end of file
- two newline between function (between all buf chhhtt)
- libc function call (pr welcome to add some libc function always banned)
- nested branch more than 3 branch
- no more than 20 lines per function
- comma with no space after
- end of parenthesis with a open curly bracket next
){
- star char
*
like thischar* buf
- preprocessors indentations (
#if..
,#endif
) - multiple statements
- 5 functions per file
- filename of source code only snake_case
- ...
example if you run it as a github workflow
this is not the latest normatrix but : link (this workflow pass well, but it will not if you copy the code below)
doc
(if you use pipy) python -m normatrix
USAGE:
python -m normatrix [tests\_run]
DESCRIPTION:
check the norm! in the current working directory
ARGS:
NO check the norm
tests_run run internal tests of NorMatrix
(only from source) main.py
USAGE:
./main.py [tests\_run]
DESCRIPTION:
check the norm! in the current working directory
(import normatrix.source.main and execute the main() func)
ARGS:
NO check the norm
tests_run run internal tests of NorMatrix
(only from source) exec.sh
(this file exists only to keep compatibility to older version)
USAGE
./exec.sh [tests\_run]
DESCRIPTION:
check the norm! in the current working directory
(call main.py)
ARGS:
NO check the norm
tests_run run internal tests of NorMatrix
(only from source) Makefile
(this file exists only to keep compatibility to older version)
USAGE:
make -C path/to/NorMatrix PATH_CHECK=$PWD
DESCRIPTION:
check the norm! in the current working directory
(call main.py)
ARGS:
-C path/to/NorMatrix run the makefile that is in path/to/NorMatrix
instead of the one where you are
PATH_CHECK=$PWD check the norm in your current working
directory
run it as a github workflow
in the repo root :
mkdir .github
mkdir .github/workflows
echo '
name: NorMatrix Check
on: [push]
jobs:
norm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: clone NorMatrix
run: git clone https://github.com/Saverio976/NorMatrix.git
- name: NorMatrix
run: ./NorMatrix/main.py
' > .github/workflows/normatrix_check.yml
Contribute
[more information on CONTRIBUTNG.md]
thanks
chempa for his sample of file that dont follow the epitech norm
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file normatrix-0.1.8.tar.gz
.
File metadata
- Download URL: normatrix-0.1.8.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87f61a58f73a7f30036b00848bdb184395e6bf7cf2fe4ac8dcc7f2425ca0a35f |
|
MD5 | a06d6476191d4d9fdda80b828e19d42a |
|
BLAKE2b-256 | d87a9b55544d32ac4986705fe92b2ae54cc2325a1acbb8bb9cc8d6e2ac2e7258 |
Provenance
File details
Details for the file normatrix-0.1.8-py3-none-any.whl
.
File metadata
- Download URL: normatrix-0.1.8-py3-none-any.whl
- Upload date:
- Size: 16.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9df8dabe73b968ee06f6b9d402bcebdaf12872aa55a61d32f6de8101f81b2671 |
|
MD5 | 2916d3a90b8ba695e392b0bcbf6ec384 |
|
BLAKE2b-256 | 3b7e1ec6ab6a947750929dd79f964b6d1d0dce027a38edbc9b4f7105c4edab61 |