Source file headers
File header policy
The Gramps project requires that all source code files stored in the official project repository include the following header at the top of the file:
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 20xx-20xx Contributor1 Name # Copyright (C) 20xx Contributor2 Name # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #
File header procedure
The following procedures regarding source file headers shall be followed by all contributors whose changes are committed to the official project source repository:
- When a new source file is created, the header shall be prepended to the file before the file is committed to the source repository.
- The original file author shall include his/her name in the copyright statement along with the year the file was created.
- Additional contributors shall add their names and respective years of contribution in the copyright statement if they make changes to the file in the source repository.
- Years can be indicated as ranges, or separated by comas.
- While not strictly required, consider including an e-mail address in addition to the contributor name.
File header purpose
The file header has two primary purposes:
- Communication of the license the code is distributed under
- Tracking of past contributors (who are by definition copyright holders)
Copyright statement examples
Single author, all contributions in the same year:
# Copyright (C) 2015 John Doe
Single author, contributions in a range of years:
# Copyright (C) 2014-2015 John Doe
Single author, contributions in sparse years:
# Copyright (C) 2005, 2007-2013 John Doe
Multiple authors, contributions in various years:
# Copyright (C) 2005, 2007-2013 John Doe <jo[email protected]> # Copyright (C) 2009 Jane Smith # Copyright (C) 2006-2007 Ed Johnson <[email protected]>