EPITA C Coding Style Checker - validates C code against EPITA coding standards
Project description
EPITA C Coding Style Checker
A fast C linter for EPITA coding style rules. Uses tree-sitter for robust AST-based parsing.
Installation
pipx install epita-coding-style
Quick Start
epita-coding-style src/ # Check files/directories
epita-coding-style --list-rules # List all rules with descriptions
epita-coding-style --show-config # Show current configuration
epita-coding-style --help # Full usage info
Configuration
Configuration is auto-detected from (in order):
.epita-style.epita-style.tomlepita-style.toml[tool.epita-coding-style]inpyproject.toml
Priority: CLI flags > config file > preset > defaults
Generate a Config File
epita-coding-style --show-config --no-color > .epita-style.toml
This outputs a complete, commented TOML config you can customize.
Presets
epita-coding-style --preset 42sh src/ # 40 lines, goto/cast allowed
epita-coding-style --preset noformat src/ # Same + skip clang-format
Example Config
# .epita-style.toml
max_lines = 40
[rules]
"keyword.goto" = false # Allow goto
"cast" = false # Allow casts
Or in pyproject.toml:
[tool.epita-coding-style]
max_lines = 40
[tool.epita-coding-style.rules]
"keyword.goto" = false
clang-format
The format rule uses clang-format to check code formatting. Requires clang-format to be installed.
The checker looks for .clang-format in the file's directory (walking up to root), or uses the bundled EPITA config.
To disable: set "format" = false in your config, or use --preset noformat.
Pre-commit Hook
# .pre-commit-config.yaml
repos:
- repo: https://github.com/KazeTachinuu/epita-coding-style
rev: v2.3.0
hooks:
- id: epita-coding-style
args: [--preset, 42sh] # optional
License
MIT
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file epita_coding_style-2.4.1.tar.gz.
File metadata
- Download URL: epita_coding_style-2.4.1.tar.gz
- Upload date:
- Size: 18.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a6d2f2c4a9a8cabf05c622f785aaca6fdb6fb813b715b9cea490383d941e649
|
|
| MD5 |
b70376383451822068a22bb51be6769e
|
|
| BLAKE2b-256 |
e0ec5adb4930fd38a4f3b47887b3abd4761c7e3b7f765c3d235d94322cf00fb2
|
File details
Details for the file epita_coding_style-2.4.1-py3-none-any.whl.
File metadata
- Download URL: epita_coding_style-2.4.1-py3-none-any.whl
- Upload date:
- Size: 14.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f83cd7459eff83e5b5accca185b8fd4823d731eb57c566fcdca71c43276bf32e
|
|
| MD5 |
f3ecdf67e4a1b1da63af052b63878780
|
|
| BLAKE2b-256 |
190c180e85c3397457a320b266fedbeb2fb6c521b06324242c1957180e8feaa9
|