xref: /freebsd/contrib/libcbor/CONTRIBUTING.md (revision cf678e30ca015c93edc8a43aeff58cce3249c3af)
1# Contributing to libcbor
2
3libcbor is maintained by [@PJK](https://github.com/PJK) in his spare time on a best-effort basis.
4
5Community contributions are welcome as long as they align with the [project priorities](https://github.com/PJK/libcbor#main-features) and [goals](https://libcbor.readthedocs.io/en/latest/development.html#goals) and follow the guidelines described below.
6
7## Principles
8
9**Bug reports and questions:** Bug reports and specific technical questions are always welcome. Feel free to open an [issue](https://github.com/PJK/libcbor/issues).
10
11**Incremental improvements:** Bug fixes (including build scripts, examples, test, typos, CI/CD config, etc.) and documentation improvements (fixes of typos, inaccuracies, out of date content, etc.) are always welcome. Feel free to open a [PR](https://github.com/PJK/libcbor/pulls).
12
13**New features:** I am looking to keep the scope of libcbor small. If you would like to add a feature, please open an issue with your proposal (or reach out to me privately) to discuss if the feature fits into libcbor before opening a PR.
14
15**Major changes:** Please open an issue with your proposal (or reach out to me privately) to discuss if the improvement fits into cbor before opening a PR.
16
17## Pull Request Process
18
191. Ensure that all CI checks pass
202. Check that the PR is complete and of good quality
21    - Include a descriptive summary of the change. If the PR addresses an open issue, please link it.
22    - Code changes: Add tests
23    - If necessary: Update documentation, including any links
243. Code changes: Update [the changelog](https://github.com/PJK/libcbor/blob/master/CHANGELOG.md). Do *not* change the version number.
25
26## Interactions
27
28I work on libcbor on a best effort basis. The typical response time is a few days.
29
30If you do not receive a response in a few weeks, feel free to ping the PR or issue.
31
32## Coding style
33
34C++ code: `./clang-format.sh`.
35
36Function Doxygen strings:
37```c
38/** An example short description
39 *
40 * @param item The item to fooify. Describe any expectations on it (e.g."must
41 * be a valid array") and reference counting manipulation.
42 * Multi-line descriptions are OK where necessary.
43 * @param target_item Short description, always with a full stop.
44 * @return Has fooification succeeded? List any special cases.
45 */
46 bool foo(cbor_item_t *item, cbor_item_t *target_item);
47```
48
49## Resources
50
51- [Development documentation](https://libcbor.readthedocs.io/en/latest/development.html)
52
53