aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/java/jopt-simple/src/site/apt/developer.apt
blob: 59d5d82d5ae804eab11580fed4f0ae8ad3843061 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
                                   --------------
                                   Developer Docs
                                   --------------

Help for developing JOpt Simple

  This page has notes and hints for contributing to JOpt Simple, mostly around getting started and style questions.

* Code Style

  Style is important.  Why?  Chiefly to aid merges.  Reformatting code makes merging more difficult.  When needing to reformat unchanged code, please do so on a separate commit with a clear commit message indicating a non-code change.

  In general use the Eclipse formatter (there is a plugin for IntelliJ IDEA).  See <<<jopt-simple-eclipse-formatting.xml>>> and <<<jopt-simple.importorder>>> in the project root.

  The ultimate arbiter of good style is Paul Holser.

** Braces

  * Yes:

+----+
for (int i = 0; i < 10; ++i) {
    if (i < 5)
        println(i);
}
+----+

  * No:

+----+
for (int i = 0; i < 10; ++i)
    if (i < 5)
        println(i);
+----+

* {{Building}}

  There are no integration tests.  Your typical command line is:

+----+
$ mvn clean test
+----+

  Before pushing commits, please check that the site fully builds:

+----+
$ mvn clean post-site
+----+