|
| 1 | +# Guidelines for Contributing Code |
| 2 | + |
| 3 | +At New Relic we welcome community code contributions, and have taken effort to |
| 4 | +make this process easy for both contributors and our development team. |
| 5 | + |
| 6 | +## Branches |
| 7 | + |
| 8 | +The head of master will generally have New Relic's latest release. However, |
| 9 | +New Relic reserves the ability to push an edge to the master. If you download a |
| 10 | +release from this repo, use the appropriate tag. New Relic usually pushes beta |
| 11 | +versions of a release to a working branch before tagging them for General |
| 12 | +Availability. |
| 13 | + |
| 14 | +## Testing |
| 15 | + |
| 16 | +The code includes a suite of unit tests with each package which should be used |
| 17 | +to verify your changes don't break existing functionality. |
| 18 | + |
| 19 | +### Running Tests |
| 20 | + |
| 21 | +Running the test suite is simple. Just invoke: |
| 22 | + |
| 23 | +```bash |
| 24 | +$ make test |
| 25 | +``` |
| 26 | + |
| 27 | +### Writing Tests |
| 28 | + |
| 29 | +For most contributions it is strongly recommended to add additional tests which |
| 30 | +exercise your changes. |
| 31 | + |
| 32 | +This helps us efficiently incorporate your changes into our mainline codebase |
| 33 | +and provides a safeguard that your change won't be broken by future development. |
| 34 | + |
| 35 | +There are some rare cases where code changes do not result in changed |
| 36 | +functionality (e.g. a performance optimization) and new tests are not required. |
| 37 | +In general, including tests with your pull request dramatically increases the |
| 38 | +chances it will be accepted. |
| 39 | + |
| 40 | +### And Finally... |
| 41 | + |
| 42 | +You are welcome to send pull requests to us - however, by doing so you agree |
| 43 | +that you are granting New Relic a non-exclusive, non-revokable, no-cost license |
| 44 | +to use the code, algorithms, patents, and ideas in that code in our products if |
| 45 | +we so choose. Fortunately, you also agree the code is provided as-is and you provide no |
| 46 | +warranties as to its fitness or correctness for any purpose. |
| 47 | + |
| 48 | +If you have any feedback on how we can make contributing easier, please get in |
| 49 | +touch at [support.newrelic.com](http://support.newrelic.com) and let us know! |
0 commit comments