blob: 058a352f3c9856ebcc930707cbcaafff638ce3ec [file] [log] [blame]
Evgeny Mandrikov82a92ca2012-01-15 20:25:48 +00001<?xml version="1.0" encoding="ISO-8859-1" ?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
4<head>
5 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
6 <link rel="stylesheet" href=".resources/doc.css" charset="ISO-8859-1" type="text/css" />
7 <link rel="shortcut icon" href=".resources/report.gif" type="image/gif" />
8 <title>JaCoCo - Development Conventions</title>
9</head>
10<body>
11
12<div class="breadcrumb">
13 <a href="../index.html" class="el_report">JaCoCo</a> &gt;
14 <a href="index.html" class="el_group">Documentation</a> &gt;
15 <span class="el_source">Development Conventions</span>
16</div>
17<div id="content">
18
19<h1>Development Conventions</h1>
20
21<p>
22 Efficient team work that produces high-quality software requires a common set
23 of rules.
24</p>
25
26<h2>Consistent Source Tree</h2>
27
28<p>
29 Update your sources and run the build locally before every check-in. Commit
30 only if the build succeeds.
31</p>
32
33<p>
34 Documentation is part of the product. Whenever you implement a new feature or
35 change existing behavior make sure to update all corresponding JavaDoc as well
36 as other documentation with the same change set. The product should always be
37 in a consistent state. For every change the following items should be checked:
38</p>
39
40<ul>
41 <li>Corresponding JavaDoc.</li>
42 <li>Documentation referring to the modified concepts, interfaces or
43 implementation.</li>
44 <li>New features, bug fixes and modified behavior should be enlisted in the
45 <code>org.jacoco.doc/docroot/doc/changes.html</code> file together with
46 the corresponding issue tracker id.</li>
47</ul>
48
49<h2>Design for Integration</h2>
50
51<p>
52 The primary focus of the JaCoCo project is to provide a code coverage library.
53 Integrators may want to embed JaCoCo in different tools and environments with
54 very different usage scenarios. Therefore following aspects should be considered:
55</p>
56
57<p>
58 <b>Documentation:</b> All APIs should be properly documented on different
59 levels of granularity:
60</p>
61
62<ul>
63 <li>General usage</li>
64 <li>Bundle summary</li>
65 <li>Package summary</li>
66 <li>Type description</li>
67 <li>Member description</li>
68</ul>
69
70<p>
71 <b>Proper Units:</b> All APIs and internal implementation classes should form proper
72 units with well defined responsibilities and dependencies. Each class and method
73 should focus on a single concept. It should be possible to use different aspects
74 separately.
75</p>
76
77<p>
78 <b>Abstraction:</b> All APIs must use the most general abstractions possible. For instance
79 reading binary data should rely on the <code>java.io.InputStream</code> interface, not
80 on a <code>java.io.File</code> object.
81</p>
82
83<p>
84 <b>System Dependencies:</b> Avoid any dependencies to the local file system, network
85 resources, threads, processes etc.
86</p>
87
88<h2>Test Driven Development</h2>
89
90<p>
91 All code added to JaCoCo should have corresponding JUnit test cases. Ideally tests
92 are developed before or along with the actual implementation:
93</p>
94
95<ul>
96 <li>Every new feature should be verified by test cases.</li>
97 <li>Modified behavior should also be reflected by test cases.</li>
98 <li>Ideally for every reported bug a reproducer is added to the unit tests.</li>
99</ul>
100
101<h2>Keep an Eye on License Issues</h2>
102
103<p>
104 All code included with JaCoCo must conform to the EPL license.
105</p>
106
107<ul>
108 <li>
109 Every committer and contributor must agree that all code will be published
110 under EPL. He or she must be the original author and must have the
111 permission to contribute code to JaCoCo, for example if such a permission
112 is required by the employer.
113 </li>
114 <li>
115 Every third party content must be enlisted in the corresponding
116 <code>about.html</code> file along with its license.
117 </li>
118 <li>
119 Every third party content included with the JaCoCo distribution must be
120 enlisted in the <code>org.jacoco.doc/docroot/doc/license.html</code> file
121 and the corresponding <code>about.html</code> file along with its license.
122 </li>
123 <li>
124 Every source file (Java, Build Script, DTD) must have a
125 <a href="http://www.eclipse.org/legal/copyrightandlicensenotice.php">EPL
126 license notice</a>. The initial contributor should be listed. In case of
127 significant changes or additions additional contributors should also
128 be listed.
129 </li>
130</ul>
131
132</div>
133<div class="footer">
134 <span class="right"><a href="@jacoco.home.url@">JaCoCo</a> @qualified.bundle.version@</span>
135 <a href="license.html">Copyright</a> &copy; @copyright.years@ Mountainminds GmbH &amp; Co. KG and Contributors
136</div>
137
138</body>
139</html>