mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-04-17 18:21:29 +03:00
chore: developer experience - pre-commit hook, ai instructions, yaml formatting (#374)
* chore: developer experience - pre-commit hook, ai instructions, yaml formatting for prettier * no prettierrc, editorconfig instead * fixes from copilot suggestions --------- Co-authored-by: Ferdinand Schober <ferdinandschober20@gmail.com>
This commit is contained in:
23
README.md
23
README.md
@@ -182,8 +182,27 @@ For a detailed list of available features, checkout the [Cargo.toml](./Cargo.tom
|
||||
|
||||
|
||||
|
||||
## Development
|
||||
|
||||
## Installing Dependencies for Development / Compiling from Source
|
||||
### Git pre-commit hook
|
||||
|
||||
This repository includes a local git hooks directory `.githooks/` with a `pre-commit` script that enforces formatting, lints, and tests before allowing a commit. It is optional to enable it, but it will prevent you from committing code with failing unit tests or that needs clippy/fmt fixes. To enable the hook locally:
|
||||
|
||||
1. Make the hook executable:
|
||||
|
||||
```sh
|
||||
chmod +x .githooks/pre-commit
|
||||
```
|
||||
|
||||
2. Point git to the hooks directory (one-time per clone):
|
||||
|
||||
```sh
|
||||
git config core.hooksPath .githooks
|
||||
```
|
||||
|
||||
The `pre-commit` script runs `cargo fmt --all` (and fails if files were modified), `cargo clippy --workspace --all-targets --all-features -- -D warnings`, and `cargo test --workspace --all-features`.
|
||||
|
||||
### Dependencies & Compiling from Source
|
||||
<details>
|
||||
<summary>MacOS</summary>
|
||||
|
||||
@@ -456,4 +475,4 @@ The following sections detail the emulation and capture backends provided by lan
|
||||
- `libei`: This backend uses [libei](https://gitlab.freedesktop.org/libinput/libei) and is supported by GNOME >= 45 or KDE Plasma >= 6.1.
|
||||
- `windows`: Backend for input capture on Windows.
|
||||
- `macos`: Backend for input capture on MacOS.
|
||||
- `x11`: TODO (not yet supported)
|
||||
- `x11`: TODO (not yet supported)
|
||||
Reference in New Issue
Block a user