1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-15 17:47:09 +00:00
conky/web/documents/contributing.mdx

43 lines
1.7 KiB
Plaintext
Raw Normal View History

---
title: Contributing
description: How to contribute to Conky
indexWeight: 0
---
Contributions are welcome from anyone.
2019-03-03 19:08:45 +00:00
## Pull Request Guidelines
2019-03-03 19:08:45 +00:00
When submitting PRs, please:
- Describe the changes, why they were necessary, etc
- Describe how the changes affect existing behaviour
- Describe how you tested and validated your changes
- Include unit tests when appropriate
- Include any relevant screenshots/evidence demonstrating that the changes work and have been tested
- Any new source files should include a GPLv3 license header
2019-03-03 19:08:45 +00:00
- All new code must be GPLv3 licensed
- Try to leave the code better than you found it
- PRs with failed checks may be ignored or closed; please make sure
the build and checks pass if possible (and notify someone when the build
system is not working)
2019-03-03 18:18:46 +00:00
2019-03-03 19:08:45 +00:00
_Patches submitted in issues, email, or elsewhere may be ignored._
2019-03-03 18:18:46 +00:00
2019-03-03 19:08:45 +00:00
## Coding Style
2019-03-03 18:18:46 +00:00
Code should be formatted using `clang-format`. By configuring Conky with `cmake -DCHECK_CODE_QUALITY=ON`, you will be able to run `make clang-format` to automatically format code.
## Git hooks
To make life easier, you can use
[lefthook](https://github.com/evilmartians/lefthook) to handle some basic
linting with a pre-commit hook, as defined in [lefthook.yml](lefthook.yml).
Follow the [installation guide for
lefhook](https://github.com/evilmartians/lefthook/blob/master/docs/install.md),
then run `lefthook install` to enable the hooks.
2019-03-03 18:18:46 +00:00
## Unit Testing
2019-03-03 19:08:45 +00:00
Conky uses the [Catch2](https://github.com/catchorg/Catch2) unit testing framework. If you are adding new functions or methods, please consider adding unit tests for that code. Additionally, if you'd like to add tests for existing code, that would be a welcome contribution.