Skip to content

Commit

Permalink
Merge pull request #69 from lafriks/feat/spdx_3_8
Browse files Browse the repository at this point in the history
Update SPDX to version 3.8
  • Loading branch information
vmarkovtsev authored Feb 19, 2020
2 parents 4f5dc53 + 9f9e9ef commit 63bc934
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
GOPATH ?= $(shell go env GOPATH)
SPDX_DATA_VERSION ?= 3.0
SPDX_DATA_VERSION ?= 3.8

licensedb/internal/assets/bindata.go: licenses.tar urls.csv names.csv $(GOPATH)/bin/go-bindata
rm -rf license-list-data-$(SPDX_DATA_VERSION)
Expand Down
10 changes: 6 additions & 4 deletions cmd/license-detector/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,21 @@ func TestCmdMain(t *testing.T) {
assert.Len(t, r, 2)
assert.Equal(t, "../..", r[0].Arg)
assert.Equal(t, ".", r[1].Arg)
assert.Len(t, r[0].Matches, 2)
assert.Len(t, r[0].Matches, 4)
assert.Len(t, r[1].Matches, 0)
assert.Equal(t, "", r[0].ErrStr)
assert.Equal(t, "no license file was found", r[1].ErrStr)
assert.Equal(t, "Apache-2.0", r[0].Matches[0].License)
assert.InDelta(t, 0.9846, r[0].Matches[0].Confidence, 0.001)
assert.InDelta(t, 0.9877, r[0].Matches[0].Confidence, 0.001)
assert.Equal(t, "ECL-2.0", r[0].Matches[1].License)
assert.InDelta(t, 0.8995, r[0].Matches[1].Confidence, 0.001)
assert.InDelta(t, 0.9047, r[0].Matches[1].Confidence, 0.001)
buffer.Reset()
detect([]string{"../..", "."}, "text", buffer)
assert.Equal(t, `../..
98% Apache-2.0
99% Apache-2.0
90% ECL-2.0
85% SHL-0.51
85% SHL-0.5
.
no license file was found
`, buffer.String())
Expand Down
16 changes: 8 additions & 8 deletions licensedb/internal/assets/bindata.go

Large diffs are not rendered by default.

0 comments on commit 63bc934

Please sign in to comment.