|
| 1 | +# Contributing to Libbulletjme |
| 2 | + |
| 3 | +Thank you for your interest in contributing to Libbulletjme! |
| 4 | + |
| 5 | +The project isn't seeking financial contributions at this time. |
| 6 | +However, there are other ways you can contribute to Libbulletjme: |
| 7 | + |
| 8 | ++ source code additions and improvements |
| 9 | + (to the library, automated test suite, sample applications, or build scripts), |
| 10 | ++ additions and improvements to the documentation, |
| 11 | ++ bug reports, |
| 12 | ++ suggestions, |
| 13 | ++ comments on bug reports and suggestions submitted by others, and |
| 14 | ++ publicity. |
| 15 | + |
| 16 | +Generally: |
| 17 | + |
| 18 | ++ Anyone may contribute. |
| 19 | ++ Contribute only your own work, |
| 20 | + not the work of generative AI or other individuals. |
| 21 | ++ No contribution is too small to be considered. |
| 22 | + |
| 23 | +In your communications, please be |
| 24 | +as kind, polite, generous, and grateful as you can. |
| 25 | +Comparison and criticism should be kept professional and impersonal. |
| 26 | + |
| 27 | + |
| 28 | +## Pull requests |
| 29 | + |
| 30 | +Contributions of source code and documentation should be submitted |
| 31 | +as GitHub pull requests to the relevent repository. |
| 32 | +Pull requests should always target the "master" branch. |
| 33 | + |
| 34 | +Each pull request should have a single, specific purpose. |
| 35 | +Never combine unrelated changes in a single pull request. |
| 36 | + |
| 37 | +Using static-analysis tools, |
| 38 | +it's possible to quickly generate large quantities of changes. |
| 39 | +Such changes will be considered on their merits. |
| 40 | +In my experience, however, static analysis rarely yields much value. |
| 41 | +The most valuable contributions come from people actively using the library, |
| 42 | +because users have insight into what's important and what isn't. |
| 43 | + |
| 44 | +Before editing the source code, please read relevant documentation, including |
| 45 | +[the implementation page](https://stephengold.github.io/Libbulletjme/lbj-en/English/implementation.html) |
| 46 | +and the "code style" section below. |
| 47 | + |
| 48 | +Before investing hours of effort in a pull request, |
| 49 | +please communicate with the project manager |
| 50 | +to determine whether the changes you envision are actually desired. |
| 51 | +Be open to advice on how to implement your idea. |
| 52 | + |
| 53 | +Contributed changes will be reviewed prior to integration. |
| 54 | +You can facilitate this process by explicitly requesting review |
| 55 | +when you think your pull request is ready. |
| 56 | +It's fine to question or discuss review comments. |
| 57 | +Multiple review passes may be needed; please be patient. |
| 58 | + |
| 59 | + |
| 60 | +### Code style |
| 61 | + |
| 62 | +Libbulletjme has an established code style for Java, |
| 63 | +which prioritizes readability and ease of maintenance |
| 64 | +over creativity and compactness. |
| 65 | +C++ source files, on the other hand, follow various styles, |
| 66 | +depending where they originated. |
| 67 | +Changes and exceptions to the prevailing style are discouraged. |
| 68 | + |
| 69 | +The style of Java sourcecode is loosely based on Google's published rules |
| 70 | +and is largely (but not entirely) enforced by Checkstyle. |
| 71 | + |
| 72 | +Project convention (not enforced by Checkstyle) determines the order |
| 73 | +of fields and methods within Java source files. |
| 74 | +Each file is divided into sections that appear a fixed sequence: |
| 75 | + |
| 76 | ++ license |
| 77 | ++ class Javadoc |
| 78 | ++ constants |
| 79 | ++ fields |
| 80 | ++ constructors |
| 81 | ++ new methods exposed (including native public methods) |
| 82 | ++ new protected methods |
| 83 | ++ override methods, grouped by superclass or interface |
| 84 | ++ private methods |
| 85 | ++ non-public native methods |
| 86 | + |
| 87 | +Within each section, methods are arranged alphanumerically: |
| 88 | +by name and then by argument types. |
| 89 | +Constants and fields are also arranged alphanumerically within sections: |
| 90 | +by type and then by name. |
| 91 | + |
| 92 | + |
| 93 | +## Conclusions |
| 94 | + |
| 95 | +Thanks for your attention. Your cooperation will be appreciated! |
0 commit comments