Skip to content

Commit

Permalink
Add additional license filenames (#2227)
Browse files Browse the repository at this point in the history
* Add additional license filenames

Signed-off-by: Colm O hEigeartaigh <coheigea@apache.org>

* add comment about the license list being manually updated

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

---------

Signed-off-by: Colm O hEigeartaigh <coheigea@apache.org>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Co-authored-by: Alex Goodman <wagoodman@users.noreply.github.com>
  • Loading branch information
coheigea and wagoodman authored Oct 16, 2023
1 parent dcec2bc commit 144ed72
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/licenses/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ package licenses
import "github.com/anchore/syft/internal"

// all of these taken from https://github.com/golang/pkgsite/blob/8996ff632abee854aef1b764ca0501f262f8f523/internal/licenses/licenses.go#L338
// which unfortunately is not exported. But fortunately is under BSD-style license.
// which unfortunately is not exported. But fortunately is under BSD-style license. Take note that this list has
// been manually updated to include more license filenames (see https://github.com/anchore/syft/pull/2227).

var (
FileNames = []string{
Expand All @@ -18,6 +19,7 @@ var (
"LICENSE",
"LICENSE.md",
"LICENSE.markdown",
"license.txt",
"LICENSE.txt",
"LICENSE-2.0.txt",
"LICENCE-2.0.txt",
Expand Down Expand Up @@ -47,6 +49,8 @@ var (
"MIT_LICENCE",
"UNLICENSE",
"UNLICENCE",
"AL2.0",
"LGPL2.1",
}

FileNameSet = internal.NewStringSet(FileNames...)
Expand Down

0 comments on commit 144ed72

Please # to comment.