Elffuss BraidHub

kikocis/java-driver public

124f3a93f7f6 · 2.4 KiBRawPermalink
1Contributing guidelines
2=======================
3
4Working on an issue
5-------------------
6
7Before starting to work on something, please comment in JIRA or ask on the mailing list
8to make sure nobody else is working on it.
9
10If a fix applies both to 2.0 and 2.1, work on the 2.0 branch, your commit will eventually
11get merged in 2.1.
12
13Before you send your pull request, make sure that:
14
15- you have a unit test that failed before the fix and succeeds after.
16- the fix is mentioned in ``driver-core/CHANGELOG.rst``.
17- the commit message include the reference of the JIRA ticket for automatic linking
18 (example: ``Fix NPE when a connection fails during pool construction (JAVA-503).``).
19
20As long as your pull request is not merged, it's OK to rebase your branch and push with
21``--force``.
22
23If you want to contribute but don't have a specific issue in mind, the `lhf <https://datastax-oss.atlassian.net/secure/IssueNavigator.jspa?reset=true&mode=hide&jqlQuery=project%20%3D%20JAVA%20AND%20status%20in%20(Open%2C%20Reopened)%20AND%20labels%20%3D%20lhf>`_
24label in JIRA is a good place to start: it marks "low hanging fruits" that don't require
25in-depth knowledge of the codebase.
26
27Editor configuration
28--------------------
29
30General
31~~~~~~~
32
33We consider automatic formatting as a help, not a crutch. Sometimes it makes sense to
34break the rules to make the code more readable, for instance aligning columns (see the
35constant declarations in ``DataType.Name`` for an example of this).
36
37**Please do not reformat whole files, only the lines that you have added or modified**.
38
39
40Eclipse
41~~~~~~~
42
43Formatter:
44
45- Preferences > Java > Code Style > Formatter.
46- Click "Import".
47- Select ``src/main/config/ide/eclipse-formatter.xml``.
48
49Import order:
50
51- Preferences > Java > Code Style > Organize imports.
52- Click "Import".
53- Select ``src/main/config/ide/eclipse.importorder``.
54
55Prevent trailing whitespaces:
56
57- Preferences > Java > Editor > Save Actions.
58- Check "Perform the selected actions on save".
59- Ensure "Format source code" and "Organize imports" are unchecked.
60- Check "Additional actions".
61- Click "Configure".
62- In the "Code Organizing" tab, check "Remove trailing whitespace" and "All lines".
63- Click "OK" (the text area should only have one action "Remove trailing white spaces").
64
65
66IntelliJ IDEA
67~~~~~~~~~~~~~
68
69- File > Import Settings...
70- Select ``src/main/config/ide/intellij-code-style.jar``.
71
72This should add a new Code Style scheme called "java-driver".