Skip to content
This repository has been archived by the owner on Jan 21, 2023. It is now read-only.

Commit

Permalink
Merge pull request #2 from norech/dev
Browse files Browse the repository at this point in the history
v0.3.0
  • Loading branch information
norech committed Apr 26, 2022
2 parents 919b4b5 + b580af3 commit af5fde0
Show file tree
Hide file tree
Showing 2 changed files with 354 additions and 155 deletions.
55 changes: 49 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,52 @@
# cnormitek

## How to use
An Epitech C coding style faults detector.

- Clone the repo
- `sudo ./install.sh`
- `cnormitek [folder]`
- ...
- Enjoy!
## Supported rules of the Epitech C coding style

- `--cs-2020`: C Coding Style 2020
- **Rules checked:** C1, C2, C3, F2, F3, F4, F5, F6, G1, G2, H2, H3, L2, L6, L3, O1, O3, O4, V3 (minimal)
- `--cs-2021`: C Coding Style 2021
- **Rules checked:** A3, C1, C2, C3, F2, F3, F4, F5, F6, G1, G2, G7, G8, G9, H2, L2, L3, L6, O1, O3, O4, V3 (minimal)

> Due to the nature of the rules and of the performed checks, the results are
> not fully accurate, neither complete. Some of the most common faults
> related to the rules indicated above should be reported, but more complex
> cases might not be reported accurately.
## Support for `.gitignore`

Cnormitek will not check coding style on files that are ignored by Git,
unless `--no-gitignore` is specified, or `git` is absent from the PATH.

## Installation

```bash
$ git clone [email protected]:norech/cnormitek.git
$ cd cnormitek
$ sudo ./install.sh
```

## Usage

```bash
# Displays help
$ cnormitek --help

# Runs cnormitek on all files in the current directory
# and doesn't report about the F3 and O4 rules
$ cnormitek --no-F3 --no-O4 .

# Runs cnormitek on the files in the `dir` folder
# and reports according to the 2020 coding style rules
$ cnormitek --cs-2020 dir

# Runs cnormitek on the `file.c` file.
$ cnormitek file.c

# Runs cnormitek from the input stream (as a C source file)
cat code.c | cnormitek -

# Runs cnormitek from the input stream (as a C header file)
cat code.h | cnormitek --stdin-h -
```
Loading

0 comments on commit af5fde0

Please sign in to comment.