Open bmarwell opened 3 years ago
Currently there is no support of mixed years in copyright headers.
Is mixing years in copyright header common or good thing? Personally I often see people updating all years in headers around the new years day.
Personally I often see people updating all years in headers around the new years day.
Yikes. I am a java developer and contribute to apache projects. As far as I can tell, there is usually one year only, which is updated when the file is being modified. I do not think updating projects at new year is a good thing. It is not a functional change, and if forgotten will fail PRs and future builds.
Also mentioned in the GPL FAQ: https://www.gnu.org/licenses/gpl-howto.html
If mixture of different years is allowed, do you have any idea of the design of the config file?
I basically would allow regex to be included. Sadly this would not be downwards compatible.
Got to this repository via search, to automate latest year inclusion. I.e. just to check whether pushed files contains current year in copyright string. It could be done as dealing with copyright as regexp, adding some placeholders like ${YEAR}, ${FILENAME}, maybe something else could be useful as well.
Is mixing years in copyright header common or good thing?
I don't think I have ever seen a codebase older than one year which did not include mixed years in copyright headers. It is common to see a range, for example "Copyright (c) 2003-2009 Foo, Inc.".
Personally I often see people updating all years in headers around the new years day.
Several of the places I have worked would have absolutely forbidden such a large, non-functional change across the entire codebase.
I'm now thinking about the config structure like the below for allowing multiple year patterns.
{
"**/*.js": "// Copyright {YEAR} My Name. All rights reserved. MIT license.",
"params": {
"YEAR": "some regexp?"
}
}
@kt3k this would be amazing!
Hi,
is there support for copyright year check? Some projects use start,lastmod. E.g.
Copyright 2011,2021 …
Others modify the date only on updating the file, so some files might have
Copyright 2021 …
while others have older years.And a mix of both, obviously.