add(pre-commit): add configuration files for pre-commit, markdownlint, and codespell; update README with setup instructions

This commit is contained in:
HendrikRauh 2026-03-06 11:26:47 +01:00
parent 26f56e8ca6
commit 732046b15e
7 changed files with 191 additions and 69 deletions

View file

@ -70,14 +70,14 @@ You have to short-circuit `R0` on the RS485 boards to enable the termination res
### Required tools
- `ESP-IDF` (includes `idf.py`)
- `Python 3`
- `invoke` (for project tasks)
- Optional but recommended formatters:
- `clang-format`
- `black`
- `prettier`
- `svgo`
- `nixfmt`
- Optional but recommended for development:
- `pre-commit` (for code quality hooks)
- `clang-format` (C/C++)
- `prettier` (JavaScript/CSS/HTML/YAML)
- `svgo` (SVG optimization)
- `nixfmt` (Nix formatting)
### Environment setup
@ -101,6 +101,20 @@ invoke reset
invoke config
```
### Pre-commit hooks
This project uses [pre-commit](https://pre-commit.com/) to automatically check code quality, formatting, and common mistakes before committing.
**Setup:**
```bash
# Install pre-commit hooks
pre-commit install
# Optionally, run all hooks on all files
pre-commit run --all-files
```
---
## 📦 Case