| 1 |
Contributing guildelines for the Variable-Magic distribution |
| 2 |
|
| 3 |
AI-related guidelines : |
| 4 |
- Patches submitted to this project MUST NOT have any byte of content generated |
| 5 |
with AI. |
| 6 |
This policy applies regardless of : |
| 7 |
* whether the patch was totally or partially written by AI ; |
| 8 |
* whether AI was used for writing code, documentation, metadata files, |
| 9 |
scripts or tests ; |
| 10 |
* the quality of the reviewing process. |
| 11 |
- Tickets, messages and requests that come with contributions MUST NOT have |
| 12 |
been generated by AI either. |
| 13 |
In particular, "AI analysis"-style messages will be ignored. |
| 14 |
|
| 15 |
Patch submissions guidelines : |
| 16 |
- Patches VERY MUCH SHOULD be generated with "git format-patch". |
| 17 |
If that's really not possible, make sure your patches apply cleanly in the |
| 18 |
distribution directory. |
| 19 |
- Single patches MUST be submitted to the bugtracker. |
| 20 |
Open a ticket and add your patch as an attachment. |
| 21 |
- Series of patches CAN be submitted as a public feature branch. |
| 22 |
You can clone the directory wherever you want and point me to your remote |
| 23 |
branch as long as I don't need to log in. |
| 24 |
|
| 25 |
C/XS-related guidelines : |
| 26 |
- C code MUST be kept ANSI-compliant. |
| 27 |
Older perl versions may have been built with a C compiler that does not |
| 28 |
support C99 features (plus they are mostly useless except for restrict). |
| 29 |
In particular, this means no C99 comments, no mixed declaration and code, |
| 30 |
and no C++ void* casts. |
| 31 |
- XS code MUST be buildable with any perl matching the META requirements. |
| 32 |
If needed, wrap your code around with the XSH_HAS_PERL(x, y, z) macro. |
| 33 |
|
| 34 |
Tests-related guidelines : |
| 35 |
- Patches MUST be tested before being sent. |
| 36 |
Make sure the distribution builds and tests correctly. |
| 37 |
- Patches that add version-specific code MUST be tested with at least |
| 38 |
one perl release matching each version interval. |
| 39 |
That is, if you add new code specific to perl 5.34 and above, then you |
| 40 |
have to test it with a pre-5.34 perl (e.g. 5.32) and a post-5.34 perl |
| 41 |
(e.g. 5.34). |
| 42 |
- C/XS patches MUST be tested with a threaded perl regardless of how much you |
| 43 |
dislike perl threads. |
| 44 |
Testing with a threaded perl makes sure your code can build in many more |
| 45 |
situations. Memory issues are also more easily spotted. |
| 46 |
- Bugfixes SHOULD come with a regression test. |
| 47 |
Add it to an existing .t file or create your own. |
| 48 |
|
| 49 |
What you don't need to do : |
| 50 |
- DON'T update the Changes file. |
| 51 |
- DON'T run author tests. |