Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The whitespace formatting, among other code styling, is enforced via Checkstyle, which is run against the code during each Maven build. The build will fail if formatting violations are found.

The full guidelines are found in the Code Style Guidelines.

Prior to contributing code to ONOS, all developers should set-up their IDE to appropriately tag the code with the Apache 2 license header text. The bare text is checked in under tools/dev/header.txt, and the original can be found at: 

http://www.apache.org/licenses/LICENSE-2.0.html 

Example: Copyright setup on IntelliJ

...

Configure the Comments for Files similar to the following. 
Remember to put a check on "Automatically add comments for new methods and types" to apply these templates on new files.  

Git/Gerrit Setup

Configuring Gerrit

Prospective contributors should configure their account to receive notifications about their code submissions. The Settings page is accessed from the user dropdown on the upper right of the page:

Image Added

To configure contacts by going to Contact Information, and filling out the fields, and hitting Save Changes :

Image Added

To subscribe to the project, go to Watched Projects and enter onos-next in the Project Name field of the page. Hitting return should add onos-next to a table under the search field:

Image Added

As shown above, email notifications are also configured from here by checking off the types of notifications to receive. 

Configuring git

Developers planning to contribute code should configure git with their username and email.

...