Cleanup file headers
khassel opened this issue · 7 comments
See discussion here.
Beside the author headers: Need we in every file the MIT Licensed
stuff?
Any other cleanup wishes?
For the author headers: find ./ -type f -exec sed -i -r '/^\s\* By.*$/d' {} \;
In my understanding of MIT, it is not necessary to mention the license in all files. But I think it's fine to do it.
As a basis for discussion, here is the current header from app.js
:
/* MagicMirror²
* The Core App (Server)
*
* By Michael Teeuw https://michaelteeuw.nl
* MIT Licensed.
*/
And here three spontaneous proposals:
Proposal 1:
author line removed + asterisk below each other
/*
* MagicMirror²
* The Core App (Server)
*
* MIT Licensed.
*/
Proposal 2:
author line removed + license note formulated in more detail + asterisk below each other
/*
* MagicMirror²
* The Core App (Server)
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
Proposal 3:
author line and license note removed + asterisk below each other
/*
* MagicMirror²
* The Core App (Server)
*/
Feel free to tear these proposals apart. The license part in proposal 2 I found in the sources of react.
There are even a few ESLint plugins that check the headers. Here is the rule of one of them that seems suitable: https://github.com/nikku/eslint-plugin-license-header/blob/master/docs/rules/header.md
The example there looks very similar to proposal 2.
/**
* Copyright (c) Foo Corp.
*
* This source code is licensed under the WTFPL license found in the
* LICENSE file in the root of this projects source tree.
*/
Edit: But with the ESLint plugin approach, I now see the downside that the headers have to be the same everywhere... Additions like "The Core App (Server)" couldn't be in that block.
Proposal 4: Remove headers alltogether. They provide no real information. I would rather have proper jsdoc headers everywhere ;-)
from my side we can remove all these headers ...
I'm also fine with removing 👍