File: contributing.mdx

package info (click to toggle)
conky 1.22.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,940 kB
  • sloc: cpp: 63,722; ansic: 18,079; python: 813; xml: 324; sh: 243; makefile: 142; javascript: 139
file content (42 lines) | stat: -rw-r--r-- 1,717 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
title: Contributing
description: How to contribute to Conky
indexWeight: 0
---

Contributions are welcome from anyone.

## Pull Request Guidelines

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
- 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)

_Patches submitted in issues, email, or elsewhere may be ignored._

## Coding Style

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.

## Unit Testing

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.