User Tools

Site Tools


developer:contribution_guidelines

This is an old revision of the document!


OpenDaylight Coding Guidelines

Note: This document is a work in progress.

= Git commit message style =

For Git commit messages we recommend following the OpenStack commit message recommendations. See: https://wiki.openstack.org/wiki/GitCommitMessages

General Code headers

C/C++/Java

'/* * Copyright © 2015 <Company or Individual> and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution, and is available at * http://www.apache.org/licenses/LICENSE-2.0 */'

Bash/Python

<pre> ############################################################################## # Copyright © 2015 <Company or Individual> and others. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## </pre>

XML

<pre> <!–

Copyright (c) 2015 <Company or Individual> and others.

All rights reserved. This program and the accompanying materials

are made available under the terms of the Apache License, Version 2.0
which accompanies this distribution, and is available at
http://www.apache.org/licenses/LICENSE-2.0-->

</pre>

= General Code Style =

* 120 character line length

= Java =

In General we follow the Google Java Code Style Guide with a few exceptions. See: https://google-styleguide.googlecode.com/svn/trunk/javaguide.html

* 120 character line length * 72 or 80 chars for javadoc

Checkstyle

* To be added

= Python =

PEP8 is the Python standard that should be followed when coding any Python code with the following exceptions.

* 120 character line length

developer/contribution_guidelines.1422449742.txt.gz · Last modified: 2015/01/28 12:55 by Christopher Price