Contributing
How to contribute to Conky
Contributions are welcome from anyone.
Pull Request Guidelines
When submitting PRs, please:
- Describe the changes and explain why they were necessary
- Describe how the changes affect existing behavior
- Explain how you tested and validated your changes
- Include unit tests when appropriate
- Include relevant screenshots or other evidence showing that the changes work
- Add a GPLv3 license header to any new source files
- Ensure that all new code is 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 let someone know when the build system is not working
Patches submitted in issues, email, or elsewhere may be ignored.
Coding Style
Code should be formatted with clang-format. If you configure Conky with
cmake -DCHECK_CODE_QUALITY=ON, you can run make clang-format to format the
code automatically.
Git hooks
To make life easier, you can use
lefthook to handle some basic
linting with a pre-commit hook, as defined in lefthook.yml.
Follow the installation guide for
lefthook,
then run lefthook install to enable the hooks.
Unit Testing
Conky uses the Catch2 unit testing framework. If you add new functions or methods, please consider adding unit tests for them. Additional tests for existing code are also welcome.