Why does everybody writes the copyright notice on the top of a source file? Isn't LICENSE file in the root of the package enough?

1 Answer 1


Files and authors can have many-to-many relationships: a file may have many different authors. I suppose you could enumerate the list of copyrights of each and every file in a master list somewhere, but that sounds like a lot more work than simply keeping each list of copyright notices within its respective file.

Even in the case of a single author, this also has the benefit of ease of extraction and transplantation into a new project. Virtually all FLOSS licenses require attribution, so if you want to lift a file from Project A and place it into Project B, you'd need to dig into another file with a master list of copyright information, look up the file(s) you want, and then move that information into the file or into Project B's master copyright list. That's a lot more work than simply copying the file as-is with copyright headers included!

A separate, related issue is license information in headers. This is important because simply including a copy of a license in a project doesn't rigorously indicate that all or any of the project is actually under that license. For example, maybe the code is under one license and art assets are under another license. Or maybe a GPL project has included files from another project that are GPL-compatible but under a different license. Including licensing information on a per-file basis eliminates confusion about which files are licensed which way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.