Difference between revisions of "Project Proposals/Code Prep Suggestions"

From fd.io
Jump to: navigation, search
(Created page with "== Copyright and license headers in source code files == Please make sure all source code files contain a correct header of the form: <pre> /* * Copyright (c) <year> <copyr...")
 
(Debranding code)
 
(One intermediate revision by the same user not shown)
Line 21: Line 21:
 
</pre>
 
</pre>
  
Where you substitute the year and copyright holder.  You can see an example in the code at the top of the file here[https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blob;f=opendaylight/arphandler/src/main/java/org/opendaylight/controller/arphandler/internal/Activator.java;h=705ffbfa632d94237ee8c55d4f8eec753969d935;hb=HEAD | here].
+
Where you substitute the year and copyright holder.  You can see an example in the code at the top of the file here[https://gerrit.fd.io/r/gitweb?p=vpp.git;a=blob;f=vnet/vnet/l2/feat_bitmap.c;h=74917cda3ae47cdcc82773b25962983572306ce3;hb=HEAD | here].
 
(Note: Please make sure to use the correct copyright holder rather than copying verbatim the example ;) ).
 
(Note: Please make sure to use the correct copyright holder rather than copying verbatim the example ;) ).
  
Line 50: Line 50:
 
== Debranding code ==
 
== Debranding code ==
  
Try to root out references to particular companies, trademarks, or brands in the code.  Note, this does not apply to normal copyright headers referencing a company as the copyright holder.
+
Try to root out references to particular companies, trademarks, or brands in the code.  Note, this does not apply to normal copyright headers referencing a company as the copyright holder.  Note, this also does not apply to functional references to brands (ie, driver for Yoyodyne NIC, etc).

Latest revision as of 16:51, 18 February 2016

Copyright and license headers in source code files

Please make sure all source code files contain a correct header of the form:

/*
 * Copyright (c) <year> <copyright holder>.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");                                                                                    
 * you may not use this file except in compliance with the License.                                                                                   
 * You may obtain a copy of the License at:                                                                                                           
 *                                                                                                                                                    
 *     http://www.apache.org/licenses/LICENSE-2.0                                                                                                     
 *                                                                                                                                                    
 * Unless required by applicable law or agreed to in writing, software                                                                                
 * distributed under the License is distributed on an "AS IS" BASIS,                                                                                  
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.                                                                           
 * See the License for the specific language governing permissions and                                                                                
 * limitations under the License.                                                                                                                     
 */

Where you substitute the year and copyright holder. You can see an example in the code at the top of the file here| here. (Note: Please make sure to use the correct copyright holder rather than copying verbatim the example ;) ).

Please note: when subsequent contributors make substantive changes to a file they may also optionally add a copyright header for themselves, but should preserve existing copyright statements and the license.

Example:

/*
 * Copyright (c) 1970 Yoyodyne.
 * Copyright (c) 2013 John Smith
 *
 * Licensed under the Apache License, Version 2.0 (the "License");                                                                                    
 * you may not use this file except in compliance with the License.                                                                                   
 * You may obtain a copy of the License at:                                                                                                           
 *                                                                                                                                                    
 *     http://www.apache.org/licenses/LICENSE-2.0                                                                                                     
 *                                                                                                                                                    
 * Unless required by applicable law or agreed to in writing, software                                                                                
 * distributed under the License is distributed on an "AS IS" BASIS,                                                                                  
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.                                                                           
 * See the License for the specific language governing permissions and                                                                                
 * limitations under the License.  
 */

Debranding code

Try to root out references to particular companies, trademarks, or brands in the code. Note, this does not apply to normal copyright headers referencing a company as the copyright holder. Note, this also does not apply to functional references to brands (ie, driver for Yoyodyne NIC, etc).