25 Commits

Author SHA1 Message Date
Thibault Saunier
3fe0127a64 scripts: git-hooks: ci: Add GES children properties documentation check
Add a pre-commit hook that automatically checks if GES children properties
documentation is up to date when GES source files are modified. The hook
runs the document-children-props.py script and warns if the generated
documentation files have changes that need to be committed.

This ensures that children properties documentation stays synchronized
with code changes and prevents outdated documentation from being merged.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5987>
2025-08-05 12:48:38 +00:00
Thibault Saunier
6c5ab780d5 pre-commit: Use default plugins rank when checking the doc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9130>
2025-06-03 15:59:12 +00:00
Xavier Claessens
a54568a93c pre-commit: Advice to install pre-commit in deprecation message
Running "meson setup" again is not enough, pre-commit must be installed.
Meson already prints a warning but that's not fatal and easy to miss.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8438>
2025-02-17 08:31:36 +00:00
Thibault Saunier
7a70860ac0 hooks: docs: Ensure the hodoc config has a gst_plugin_library field before using it
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8476>
2025-02-14 16:50:41 +00:00
L. E. Segovia
88cead25ee hooks: undelete the Python/docs precommit hook
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8432>
2025-02-07 14:11:23 +00:00
Andoni Morales Alastruey
3213e641ec hooks: use pre-commit to run all hooks
Migrate all the pre-commit and commit-msg hooks to use
pre-commit (https://pre-commit.com/)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5192>
2025-01-31 19:15:25 -03:00
Mathieu Duponchelle
11e37a9833 pre-commit: build all hotdoc-configs targets
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8149>
2025-01-16 12:35:13 +00:00
Mathieu Duponchelle
e131b8df8e pre-commit: make cache location subproject-dependent
Caches are sometimes stored in a plugins/ subdirectory, sometimes not

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8149>
2025-01-16 12:35:13 +00:00
Mathieu Duponchelle
30861a14b2 pre-commit: make caches dict generic
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8273>
2025-01-13 18:10:37 +01:00
Mathieu Duponchelle
72f380c739 pre-commit: fix path to cache generator
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8273>
2025-01-13 18:10:37 +01:00
Mathieu Duponchelle
a15c786db5 docs: implement pre-commit hook to check cache updates and since tags
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8231>
2025-01-09 16:19:39 +00:00
Jordan Petridis
2b76f36843 pre-commit: Fix typo in the hook
You saw nothing. Typo? what typo.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6956>
2024-06-01 10:13:18 +00:00
Jordan Petridis
b850a658ed pre-commit: Update the indent hook to work with our fork
We now have gst-indent-1.0 [1] which is a stripped down
fork of the version we expect. It's also using meson,
which is a bonus.

[1] https://gitlab.freedesktop.org/gstreamer/gst-indent

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6624>
2024-05-28 13:27:57 +00:00
Jordan Petridis
d72d79d85a pre-commit: Avoid prefixing string comparissons with x
This was working around bugs in various shells, but this
problem has been fixed for a decade now.

https://www.shellcheck.net/wiki/SC2268

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6652>
2024-04-24 12:37:31 +00:00
Jordan Petridis
490deafcbe git-hooks/pre-commit-python.hook: Fix typos
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6652>
2024-04-24 12:37:31 +00:00
Jordan Petridis
a12881e2e4 git-hooks/pre-commit-python.hook: Specify encoding for the open call
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6652>
2024-04-24 12:37:31 +00:00
Jordan Petridis
7b81d081ad pre-commit: Stop using legacy backticks in shell
We can repalce them with the simpler $(foo) syntax instead

https://www.shellcheck.net/wiki/SC2006

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6652>
2024-04-24 12:37:31 +00:00
Tim-Philipp Müller
da3229d0cc git-hooks: use bash for pre-commit-invoke-python
Since it contains bashisms.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5091>
2023-07-31 17:55:57 +00:00
Nirbheek Chauhan
fcf590a86e git-hooks: Not all OSes ship Python 3 under "python"
macOS doesn't, for instance. Use a shell script to detect which python
to run, which is always available on all OSes due to how git is
packaged on Windows.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5060>
2023-07-20 11:00:35 +00:00
L. E. Segovia
3dc1b12f13 git-hooks: Allow running the precommit hook in Windows
Windows based Python does not install a python3 executable, that one is
managed by the Microsoft Store as an alias exclusively.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4968>
2023-07-05 16:04:07 +00:00
Colin Kinloch
39f15af038 git: Show all suggestions on pre-commit hook
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3506>
2022-12-02 17:53:34 +00:00
Andoni Morales Alastruey
7604c7b088 csharp: check format in the pre-commit hook
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/983>
2022-04-05 08:28:50 +00:00
Thibault Saunier
57bfb85bc5 hooks:python: Max line length should be 120
As we ignore line length in pycodestyle and we have many places with
line with more than 80 and less than 120 chars

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1121>
2021-10-14 12:59:29 +00:00
Nicolas Dufresne
f54c2a2bac move_mrs: Disable our commit hook during the move
As GNU indent version can be different on the user system, we see some
differences during migration thas causes conflicts. Making cherry-pick
difficults to recover without breaking the style temporily. Note that
cherry-pick continuation does not allow passing the -n option to skip
the hooks.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1017>
2021-10-04 12:56:47 +00:00
Nicolas Dufresne
3037fde5eb Move commit gst-indent hook to the root
This renable at meson setup time the installation of the gst-indent
commit hook. The hooks were kept from gst-devtools as this set supports
both C checks and Python checks.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/904>
2021-09-24 17:47:01 -03:00