mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-02-10 04:20:31 +01:00
Add a pre-commit hook
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)
This commit is contained in:
parent
8954d96227
commit
e6cb6b1998
1 changed files with 18 additions and 0 deletions
18
.pre-commit-config.yaml
Normal file
18
.pre-commit-config.yaml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
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']
|
||||
Loading…
Add table
Reference in a new issue