views:

180

answers:

2

Gnu GPL page advocates a following header in each file of GPL project:

This file is part of Foobar.

Foobar 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 3 of the License, or (at your option) any later version.

Foobar 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 Foobar. If not, see http://www.gnu.org/licenses/.

I find this an over kill. Can't it be shorter and somehow refer to COPYING or LICENCE file?

A: 

Many editors allow you to collapse the comments at the top of the file (Eclipse does it by default), which would allow you to put it there without seeing it as part of the file. Alternatively, you could just refer to a file distributed with it (i.e. a LICENSE file, as you said) but this means that if someone copies just the file without the rest of the distribution, you lose the licensing information.

Steven Schlansker
+4  A: 

FWIW, this is more of a legal question than a programming question (though obviously it's of great interest to programmers). So barring any answers from lawyers, you might want to be cautious of accepting our advice.

That being said, in my not-a-lawyer opinion, all you really need is the copyright notice. Licenses grant people rights above and beyond what copyright law normally allows, so if your license covers all files in the distribution, you probably don't need to worry about every single file containing that kind of notice. I think that recommendation is more to advertise the goals of the particular licensing scheme than to actually protect the contents of the particular file.

Cogwheel - Matthew Orlando