2021-03-26 16:28:10 +05:30
|
|
|
.. _contributing:
|
2020-05-19 17:43:08 +03:00
|
|
|
|
2021-03-26 16:28:10 +05:30
|
|
|
Contributing to WirePlumber
|
|
|
|
|
===========================
|
|
|
|
|
|
|
|
|
|
Coding style
|
|
|
|
|
------------
|
2020-05-19 17:43:08 +03:00
|
|
|
|
|
|
|
|
WirePlumber uses the
|
2021-03-26 16:28:10 +05:30
|
|
|
`GNOME C Coding Style <https://developer.gnome.org/programming-guidelines/unstable/c-coding-style.html.en>`_
|
2020-05-19 17:43:08 +03:00
|
|
|
with K&R brace placement and 2-space indentation, similar to
|
2021-03-26 16:28:10 +05:30
|
|
|
`GStreamer <https://gstreamer.freedesktop.org/documentation/frequently-asked-questions/developing.html#what-is-the-coding-style-for-gstreamer-code>`_.
|
2020-05-19 17:43:08 +03:00
|
|
|
When in doubt, just follow the example of the existing code.
|
|
|
|
|
|
2021-03-26 16:28:10 +05:30
|
|
|
WirePlumber ships with a `editorconfig <https://editorconfig.org/>`_ file.
|
2020-05-19 17:43:08 +03:00
|
|
|
If your code editor / IDE supports this, it should automatically set up
|
|
|
|
|
the indentation settings.
|
|
|
|
|
|
2021-03-26 16:28:10 +05:30
|
|
|
* When submitting changes for review, please ensure that the coding style of the changes respects the coding style of the project.
|
2020-05-19 17:43:08 +03:00
|
|
|
|
2021-03-26 16:28:10 +05:30
|
|
|
Tests
|
|
|
|
|
^^^^^
|
2020-05-19 17:43:08 +03:00
|
|
|
|
2021-03-26 16:28:10 +05:30
|
|
|
See
|
|
|
|
|
:ref:`testing`
|
2020-05-19 17:43:08 +03:00
|
|
|
|
2021-03-26 16:28:10 +05:30
|
|
|
Running in gdb / valgrind / etc...
|
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-05-19 17:43:08 +03:00
|
|
|
|
|
|
|
|
The Makefile included with WirePlumber supports the `gdb` and `valgrind`
|
|
|
|
|
targets. So, instead of `make run` you can do `make gdb` or `make valgrind`
|
|
|
|
|
to do some debugging.
|
|
|
|
|
|
|
|
|
|
You can also run in any other wrapper by setting the `DBG` variable
|
2021-03-26 16:28:10 +05:30
|
|
|
on `make run`. For example::
|
|
|
|
|
|
|
|
|
|
$ make run DBG="strace"
|
2020-05-19 17:43:08 +03:00
|
|
|
|
2021-03-26 16:28:10 +05:30
|
|
|
Merge requests
|
|
|
|
|
^^^^^^^^^^^^^^
|
2020-05-19 17:43:08 +03:00
|
|
|
|
|
|
|
|
In order to submit changes to the project, you should create a merge request.
|
|
|
|
|
To do this,
|
|
|
|
|
1. fork the project on https://gitlab.freedesktop.org/pipewire/wireplumber
|
|
|
|
|
2. clone the forked project on your computer
|
|
|
|
|
3. make changes in a new git branch
|
2020-06-15 11:33:45 +03:00
|
|
|
4. rebase your changes on top of the latest `master` of the main repository
|
|
|
|
|
5. push that branch on the forked repository
|
|
|
|
|
6. follow the link shown by `git push` to create the merge request
|
|
|
|
|
(or alternatively, visit your forked repository on gitlab and create it from there)
|
|
|
|
|
|
|
|
|
|
While creating the merge request, it is important to enable the
|
|
|
|
|
`allow commits from members who can merge to the target branch` option
|
|
|
|
|
so that maintainers are able to rebase your branch, since WirePlumber uses
|
|
|
|
|
a fast-forward merge policy.
|
2020-05-19 17:43:08 +03:00
|
|
|
|
|
|
|
|
For more detailed information, check out
|
2021-03-26 16:28:10 +05:30
|
|
|
`gitlabs manual on merge requests <https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html>`_
|