Closed ktoso closed 6 years ago
I tried sbt-header
v3 locally. It produced this:
/*
* Copyright 2014 Lightbend
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
This is the original header:
/**
* Copyright (C) 2009-2017 Lightbend Inc. <http://www.lightbend.com>
*/
Which one you would like to use?
If you want to use original header, it would need to write a custom license header in build.sbt
.
We should keep the "original header", license is in the LICENSE file, we don't add it to all files.
Thanks for trying!
I have some questions of current header.
There are 3 types of copyright text.
1.1. Copyright (C) 2017 Lightbend Inc. <http://www.lightbend.com>
Which is the suggestion of copyright text.
1.2. Copyright (C) 2009-2017 Lightbend Inc. <http://www.lightbend.com>
1.3. Copyright (C) 2009-2017 Typesafe Inc. <http://www.typesafe.com>
There are 3 types of comment style.
2.1.
2.2.
2.3.
2.1 could be supported from sbt-header
directly. 2.2 and 2.3 may be supported with extra code.
I could read LICENSE as text of header then set-header
would try to insert to source code. But it would make lots of changes. Or maybe I could send a PR to let all of you know what's look like.
The formatting style we should use is 2.1.
As for the dates - the date "from" is when the file was first committed and the latter is the current year. Perhaps we could be ok with the "2009 - current year" but I'm not a lawyer...
// cc @patriknw
I found there are some codes are not using Lightbend copyright. I would list some of those I think you would want to know first.
Come from Shapeless
akka-http/akka-parsing/src/main/scala/akka/shapeless
Most codes in package - akka-http/akka-parsing/src/main/scala/akka/parboiled2
Copyright (C) 2009-2017 Mathias Doenitz, Alexander Myltsev
And more, like the shaded protobuf.
In such cases both headers must be retained, the original one and the lightbend one can be added.
As people keep forgetting to add the headers, and @hseeberger claims the v2.0 is much stabler than the initial version (which we attempted to use, but failed back them).
https://github.com/sbt/sbt-header (same for akka eventually, if we work it out here)