mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-05-02 01:38:13 +02:00
Moving my local hooks into a pre-commit hook set that others can find useful too: - remove trailing whitespaces and newlines - don't allow commits to the "main" branch - python black and python ruff (same args as in the CI)
18 lines
483 B
YAML
18 lines
483 B
YAML
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v2.3.0
|
|
hooks:
|
|
- id: end-of-file-fixer
|
|
- id: trailing-whitespace
|
|
- id: no-commit-to-branch
|
|
args: ['--branch', 'main']
|
|
- repo: https://github.com/psf/black
|
|
rev: 22.10.0
|
|
hooks:
|
|
- id: black
|
|
args: ['--check', '--diff', '.', 'proto/ei-scanner']
|
|
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
|
rev: v0.0.254
|
|
hooks:
|
|
- id: ruff
|
|
args: ['--ignore=E741,E501', '.', 'proto/ei-scanner']
|