Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am looking for standards regarding open source code release. Most of the time, one may find a copyright statement and a few lines about the project at the beginning of each file, but I am having a hard time finding general guidelines and good practices, beyond the peculiarities of each project or license type.

Related topics

There are related questions which provide answers for specific cases but no general answer to this particular question (imho):

Summary

  • What kind of information do you expect to find at the beginning of each file of a project ? What is useful and/or required to mention ?

Authorship and copyright

  • What are the good practices for mentioning authorship ? Is Copyright (year) Name1, Name2, etc. a good option or should the names of the coders and the copyright information be displayed separately ?

Licensing

  • Should the license or parts of it appear in each file or (for example) just in the README file ?

Disclaimer

  • Is a disclaimer such as 'We cannot be held liable if your damage your machine while using this software' required each time ?
share

migration rejected from stackoverflow.com Aug 4 '13 at 5:59

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as primarily opinion-based by MichaelT, gnat, Bart van Ingen Schenau, Corbin March, Eric King Aug 4 '13 at 5:59

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

2  
In many cases, the license chosen will mandate some or all of this. –  Steven Burnap Aug 2 '13 at 19:16
comments disabled on deleted / locked posts

1 Answer

Unless you're using a open source project with a specific per-file requirement, there isn't anything that you should put in each file, top, bottom, or between.

License information belongs in a clear, specific, SEPARATE location. For source code, a "licence.txt" file at the root of the project tree is appropriate. License location on complied code varies by application type and distribution method.

The only time I'd include a licence reference on a file of program code is when it's a one-file project or distribution meant to be re-used without alteration in someone else's code, like a (minified) JavaScript file meant to be loaded on a web page, or a .cs or .vb file meant to be added in and complied with someone else's compiled code.

share
add comment