Development Conventions

Efficient team work that produces high-quality software requires a common set of rules.

Consistent Source Tree

Follow the existing coding style and formatting rules. The projects contain auto-formatting rules for the Eclipse IDE.

Update your local branches and run the build locally before every push. Push only if the build succeeds and the configured compiler settings do not show any warnings in the Eclipse IDE.

Documentation is part of the product. Whenever you implement a new feature or change existing behavior make sure to update all corresponding JavaDoc as well as other documentation with the same change set. The product should always be in a consistent state. For every change the following items should be checked:

Design for Integration

The primary focus of the JaCoCo project is to provide a code coverage library. Integrators may want to embed JaCoCo in different tools and environments with very different usage scenarios. Therefore following aspects should be considered:

Documentation: All APIs should be properly documented on different levels of granularity:

Proper Units: All APIs and internal implementation classes should form proper units with well defined responsibilities and dependencies. Each class and method should focus on a single concept. It should be possible to use different aspects separately.

Abstraction: All APIs must use the most general abstractions possible. For instance reading binary data should rely on the java.io.InputStream interface, not on a java.io.File object.

System Dependencies: Avoid any dependencies to the local file system, network resources, threads, processes etc.

Test Driven Development

All code added to JaCoCo should have corresponding JUnit test cases. Ideally tests are developed before or along with the actual implementation:

Keep an Eye on License Issues

All code included with JaCoCo must conform to the EPL license.

Contribution process

All changes on the JaCoCo code base are handled via GitHub pull requests and always reviewed by a second developer. This applies for external contributors as well as for project members. Beside functional correctness every pull request needs to fulfill the conventions above.

For external contributors the following recommendations will help the project to incorporate their precious work: