Commit graph

10 commits

Author SHA1 Message Date
Peter Hutterer
7e98f2f2d2 pre-commit: update the name for the ruff check
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1272>
2025-07-15 16:24:27 +10:00
Peter Hutterer
b347cc8691 pre-commit: bump to latest ruff-format
And update our python files according to latest ruff format output.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1259>
2025-07-09 00:13:00 +00:00
Peter Hutterer
17731d415d Add a clang-format file for consistent code formatting
This *mostly* resembles our current coding style, at least to the extent
possible with clang-format.

There are a few oddities but they're not worth fighting over (for now)
and the most egregious violations have been addressed by shuffling
things around or just disabling clang-format in the previous commits.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1246>
2025-07-01 16:42:44 +10:00
Peter Hutterer
dd78765674 pre-commit: add a hook for checking for duplicate empty lines
It's a bit annoying to only find those during a CI pipeline run, so
let's add a hook for it. Pre-commit doesn't seem to have something
useful for duplicate line detection so let's hack up a quick script
that can do this for us, together with the other whitespace checks in
the CI so we're consistent.

Excluded from the duplicate line checks are anything "Not C" and the
"include/" directory since we don't control those files.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1154>
2025-03-11 11:41:34 +00:00
andeston
84225f28b6 pre-commit-hooks v5.0.0
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1086>
2024-12-04 02:02:12 -05:00
andeston
2fa31f68b3 ruff-pre-commit v0.8.1
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1086>
2024-12-04 02:02:12 -05:00
Peter Hutterer
3b85a4017d CI: update to latest ci-templates
This allows for gitlab private emails in commit messages.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1087>
2024-12-03 23:11:59 +00:00
Peter Hutterer
a61c876412 pre-commit: drop black, use ruff-format instead
And switch to the current-ish version of the ruff pre-commit hook,
including updating the repo.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1072>
2024-10-29 13:48:31 +10:00
Peter Hutterer
e72ee0b1c8 pre-commit: ignore subprojects for ruff and black
We don't have any subprojects yet but let's not fail badly for something
that's not our fault.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1005>
2024-06-05 10:38:08 +00:00
Peter Hutterer
53517dccb8 Add pre-commit hooks
This ensures a few things are correct before we commit and/or push,
making life a bit easier for both our contributors and our maintainers
since some things should no longer end up in the MRs.

Activate via:
$ pre-commit install
$ pre-commit install --hook-type pre-push

The latter is required for the ci-templates hooks which are pre-push
only.
2023-09-01 09:12:54 +00:00