Difference between revisions of "Project Proposals/Code Prep Suggestions"
From fd.io
(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...") |
(→Copyright and license headers in source code files) |
||
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:// | + | 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 ;) ). | ||
Revision as of 22:36, 15 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.