# Should I include a copyright line in every file?

This is similar to my other question, but specifically about Copyright rather than Licensing.

Typically, each source file contains a line of the form

Copyright 2010-2015, Me

• Is this strictly necessary, or would a single COPYRIGHT file at the root of the repository cover all files within the project?
• Do I need a separate COPYRIGHT file as well, to cover the entire project as a collection, rather than individual files?
• If I have a copyright line in each source file, should they all reflect the same year range? Or should each file's line reflect the year-range from creation to the year it was last modified?
• Is this a project to which you are the sole contributor, or are there multiple people contributing? – trichoplax Jun 24 '15 at 20:46
• It's also relevant which licence you are using. The more permissive a licence you apply, the less relevant the copyright lines are. – trichoplax Jun 24 '15 at 20:48
• I personally go with one file in the project, but I don't know if it has any effect for laws. I know though that I can claim my copyright if I make this notice or not. But maybe it's harder to proof without such notice. – Mnementh Jun 24 '15 at 20:48
• Nowadays, a good middle ground is to put a one-line comment like # SPDX-License-Identifier: MIT in each source file, together with a list of the authors and copyright years for that file. Then put the full license texts in a LICENSES directory at the root of the project. The conventions are evolving, but some documentation is here: reuse.software/practices/2.0 – Lassi Jul 21 at 8:48

I think it's important to include both copyright and licensing information in all files: it ensures that everyone's rights are perfectly clear, regardless of what happens to the code in the future. Your project may be small and self-contained initially, but it often happens that interesting code ends up copied into multiple projects, or that projects get adopted by various people down the line. In both cases it's much easier to keep track of licenses and copyright information if it's specified in every file.

If you consider large projects nowadays, many of them include code from a huge variety of other projects, some large, some small, and in some cases single files copied from various sources (including sometimes old Usenet posts!). Firefox is a good example of this; it includes files from many different projects, some quite small (included in Firefox here), and it can be quite hard to keep track of all the copyright holders and license information. Having it in every single file makes license auditors' jobs much easier.

There have been cases in the past of projects which couldn't be included in Linux distributions because of a couple of files whose licenses or copyright information wasn't clear... (I don't remember specifics off the top of my head, I could find them if necessary.)

Luis Villa wrote an interesting blog post on the topic.

As far as the difference between copyright and licensing goes, they are different, but licensing depends on copyright: a license is only valid inasmuch as it was originally given by the copyright holder. This reinforces the importance of including copyright information: it allows future users of your code to know who wrote it, and who to contact with any copyright-related queries (including licensing questions).

Concerning copyright years, I'll defer to the GPL howto (I don't know the reasoning behind this rule but it's probably applicable beyond just the GPL): according to the FSF, copyright statements are supposed to list the years in which the project was released, not the years in which modifications occurred. So any file which is part of a release should have its copyright statement updated on release; there are a number of tools which can automate this (copyright-update-directory in Emacs to name one). You can end up with different year ranges in your source files, but based on the first release they were part of.

• Do you think you can address the third part of the question re: copyright ranges? – kdopen Jun 25 '15 at 0:10