From my understanding, the license-bill-of-materials tool iterates through all files of a given project and determine the license information from any files that has similar name as license.*.
Because github.com/go-openapi/spec has a file license.go,
license-bill-of-materials evaluates the license.go and determine the project is also unlicense.
The following steps reproduce the above issue.
$ tree $GOPATH/src/unlicense/
├── LICENSE
├── license.go
└── main.go
$ cat unlicense/LICENSE
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
....
$ cat unlicense/license.go
// Copyright 2018 CoreOs Authors
//
// 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.
package main
$ license-bill-of-materials unlicense
[
{
"project": "unlicense",
"licenses": [
{
"type": "Apache License 2.0",
"confidence": 1
},
{
"type": "The Unlicense",
"confidence": 0.3488372093023256
}
]
}
]
license-bill-of-materials github.com/go-openapi/spec
outputs unlicense:From my understanding, the
license-bill-of-materials
tool iterates through all files of a given project and determine the license information from any files that has similar name aslicense.*
. Becausegithub.com/go-openapi/spec
has a file license.go,license-bill-of-materials
evaluates thelicense.go
and determine the project is also unlicense.The following steps reproduce the above issue.