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

From fd.io
Jump to: navigation, search
(Copyright and license headers in source code files)
(Debranding code)
 
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).