Skip to content

For Developers

cushon edited this page Oct 16, 2014 · 9 revisions

Getting started

We use the Maven build system. We are using version 3. Download Maven

We test with OpenJDK 7 and 8, so those are currently recommended. Do whatever your system requires to use one of those JDKs.

Build the library:

$ cd error-prone
$ mvn package

You'll also need to configure your IDE to build with a supported JDK.

A Maven plugin for your IDE should setup the project very conveniently, and a git plugin can simplify source code management. The core developers use IntelliJ IDEA or Eclipse.

It's very useful and recommended to locate the sources for your JDK and attach them in the IDE, so you can navigate into the javac libraries when needed.

We generally follow the Sun style guide, and limit lines to 100 cols.

Write a checker

Let's say you want to write a checker and contribute it to the project. Here are the steps you should follow.

Set up your work environment

Follow the Getting Started steps above. Then create a branch in which to do your work.

You should also add the check to the Issue Tracker (if it is not already there), comment that you are taking the issue over, and change the status from "New" to "Accepted".

Write your checker

Checkers are in the package com.google.errorprone.bugpatterns. Follow the example of one of the checkers in that package to create your own checker. Don't forget to write tests!

Request a code review

A member of error-prone team needs to review your code and merge it into the mainline project. We use github for code reviews.

Clone this wiki locally