| 1 | <html> |
| 2 | <head> |
| 3 | <title>Contributing to FindBugs</title> |
| 4 | <link rel="stylesheet" type="text/css" href="findbugs.css"> |
| 5 | @GOOGLE_ANALYTICS@ |
| 6 | </head> |
| 7 | <body> |
| 8 | |
| 9 | <table width="100%"><tr> |
| 10 | |
| 11 | @HTML_SIDEBAR@ |
| 12 | |
| 13 | <td align="left" valign="top"> |
| 14 | |
| 15 | <h1>Contributing to FindBugs</h1> |
| 16 | |
| 17 | <p> If you have a bug fix or feature enhancement you would like to contribute, |
| 18 | we would be happy to consider it for inclusion.</p> |
| 19 | |
| 20 | <h2>Import FindBugs code as Eclipse projects</h2> |
| 21 | |
| 22 | <p>The preferred way to get the FindBugs source code and create the patch is to use Eclipse + Git. |
| 23 | You can easily import FindBugs code into Eclipse by following the steps described |
| 24 | here: <a href="https://github.com/findbugsproject/findbugs/blob/master/eclipsePlugin/doc/building_findbugsplugin.txt">Import Eclipse projects</a> |
| 25 | . |
| 26 | </p> |
| 27 | |
| 28 | <h2>Preparing a patch</h2> |
| 29 | |
| 30 | <p> The best way to create a patch is to fork FindBugs Git repository here: |
| 31 | <a href="https://github.com/findbugsproject/findbugs">https://github.com/findbugsproject/findbugs</a>, |
| 32 | commit changes with descriptive commit messages (small commits are better) and |
| 33 | create a new <a href="https://github.com/findbugsproject/findbugs/pulls">pull request</a> |
| 34 | with the appropriate title and description. |
| 35 | </p> |
| 36 | |
| 37 | <p> Please follow these guidelines when preparing your patch:</p> |
| 38 | <ul> |
| 39 | <li> <b>Use the same indentation style as the source file(s) you |
| 40 | are modifying</b>. In particular, please use spaces |
| 41 | to indent your code; four spaces per indent level. |
| 42 | <li> If at all possible, avoid making whitespace modifications. |
| 43 | <li> Small patches/changesets are appreciated. |
| 44 | <li> If you have lot of changes, try to group them by small commits with descriptive messages. |
| 45 | <li> If you have multiple patches, create <b>branch per patch</b>. |
| 46 | <li> All new files should contain proper license header (<a href="http://www.gnu.org/licenses/lgpl.html">Lesser GNU Public License</a>). |
| 47 | <li> If you are submitting a new bug detector, please submit a small |
| 48 | standalone source file that contains an instance of the |
| 49 | kind of bug the detector looks for. The file should be placed at |
| 50 | <a href="https://github.com/findbugsproject/findbugs/tree/master/findbugsTestCases/src/java/ghBugsNew">findbugsTestCases/src/java/ghBugsNew</a> |
| 51 | package and named after the bug or feature you are addressing. |
| 52 | </ul> |
| 53 | |
| 54 | <p> Following these guidelines makes it much easier for us |
| 55 | to incorporate new code. |
| 56 | |
| 57 | <h2>Where to submit a patch</h2> |
| 58 | |
| 59 | <p> Patches may be submitted through the |
| 60 | <a href="https://github.com/findbugsproject/findbugs/pulls">pull requests</a> on the |
| 61 | <a href="https://github.com/findbugsproject/findbugs">GitHub project page</a>. |
| 62 | |
| 63 | @HTML_FOOTER@ |
| 64 | |
| 65 | </td> |
| 66 | |
| 67 | </tr></table> |
| 68 | |
| 69 | </body> |
| 70 | </html> |