Skip to content
Permalink
Browse files

Merge pull request #62 from vmarkovtsev/master

v3
  • Loading branch information...
vmarkovtsev committed Sep 13, 2019
2 parents e550631 + 4ba8be6 commit 7961dd6009019bc12778175ef7f074ede24bd128
@@ -2,7 +2,7 @@ dist: trusty

language: go

go_import_path: gopkg.in/src-d/go-license-detector.v2
go_import_path: gopkg.in/src-d/go-license-detector.v3
go:
- 1.11.x
- 1.12.x
@@ -19,13 +19,13 @@ install:
- export GO111MODULE=on
- make
- go mod vendor
- go build -v gopkg.in/src-d/go-license-detector.v2/cmd/license-detector
- go build -v gopkg.in/src-d/go-license-detector.v3/cmd/license-detector

script:
- go vet ./...
- lint_warns=$(golint ./... | grep -v vendor/) || true
- if [ ! -z "$lint_warns" ]; then echo "$lint_warns"; exit 1; fi
- goverage -cpu=1,2 -coverprofile=coverage.txt -covermode=count gopkg.in/src-d/go-license-detector.v2/...
- goverage -cpu=1,2 -coverprofile=coverage.txt -covermode=count gopkg.in/src-d/go-license-detector.v3/...
- sed -i '/assets/d' coverage.txt

after_success:
@@ -1,4 +1,4 @@
# go-license-detector [![GoDoc](https://godoc.org/gopkg.in/src-d/go-license-detector.v2?status.svg)](http://godoc.org/gopkg.in/src-d/go-license-detector.v2) [![Build Status](https://travis-ci.com/src-d/go-license-detector.svg?branch=master)](https://travis-ci.com/src-d/go-license-detector) [![Build status](https://ci.appveyor.com/api/projects/status/bxixhg99ewcgc5i5?svg=true)](https://ci.appveyor.com/project/vmarkovtsev/go-license-detector) [![codecov](https://codecov.io/github/src-d/go-license-detector/coverage.svg)](https://codecov.io/gh/src-d/go-license-detector) [![Go Report Card](https://goreportcard.com/badge/github.com/src-d/go-license-detector)](https://goreportcard.com/report/github.com/src-d/go-license-detector)
# go-license-detector [![GoDoc](https://godoc.org/gopkg.in/src-d/go-license-detector.v3?status.svg)](http://godoc.org/gopkg.in/src-d/go-license-detector.v3) [![Build Status](https://travis-ci.com/src-d/go-license-detector.svg?branch=master)](https://travis-ci.com/src-d/go-license-detector) [![Build status](https://ci.appveyor.com/api/projects/status/bxixhg99ewcgc5i5?svg=true)](https://ci.appveyor.com/project/vmarkovtsev/go-license-detector) [![codecov](https://codecov.io/github/src-d/go-license-detector/coverage.svg)](https://codecov.io/gh/src-d/go-license-detector) [![Go Report Card](https://goreportcard.com/badge/github.com/src-d/go-license-detector)](https://goreportcard.com/report/github.com/src-d/go-license-detector)

Project license detector - a command line application and a library, written in Go.
It scans the given directory for license files, normalizes and hashes them and outputs
@@ -20,7 +20,7 @@ The intended area of it's usage is data mining.
```
export GO111MODULE=on
go mod download
go build -v gopkg.in/src-d/go-license-detector.v2/cmd/license-detector
go build -v gopkg.in/src-d/go-license-detector.v3/cmd/license-detector
```

## Contributions
@@ -67,8 +67,8 @@ Library (for a single license detection):

```go
import (
   "gopkg.in/src-d/go-license-detector.v2/licensedb"
"gopkg.in/src-d/go-license-detector.v2/licensedb/filer"
   "gopkg.in/src-d/go-license-detector.v3/licensedb"
"gopkg.in/src-d/go-license-detector.v3/licensedb/filer"
)
func main() {
@@ -83,7 +83,7 @@ import (
"encoding/json"
"fmt"
"gopkg.in/src-d/go-license-detector.v2/licensedb"
"gopkg.in/src-d/go-license-detector.v3/licensedb"
)
func main() {
@@ -115,7 +115,7 @@ Comparison to other projects on that dataset:
|[LiD](https://source.codeaurora.org/external/qostg/lid)| 94% (847/902) | 3660 |

<details><summary>How this was measured</summary>
<pre><code>$ cd $(go env GOPATH)/src/gopkg.in/src-d/go-license-detector.v2/licensedb
<pre><code>$ cd $(go env GOPATH)/src/gopkg.in/src-d/go-license-detector.v3/licensedb
$ mkdir dataset && cd dataset
$ unzip ../dataset.zip
$ # src-d/go-license-detector
@@ -7,8 +7,8 @@ environment:

build_script:
- go mod vendor
- go build -v gopkg.in/src-d/go-license-detector.v2/cmd/license-detector
- go test gopkg.in/src-d/go-license-detector.v2/...
- go build -v gopkg.in/src-d/go-license-detector.v3/cmd/license-detector
- go test gopkg.in/src-d/go-license-detector.v3/...
- 7z a license-detector.windows_amd64.zip license-detector.exe

artifacts:
@@ -11,7 +11,7 @@ import (
"os"

"github.com/spf13/pflag"
"gopkg.in/src-d/go-license-detector.v2/licensedb"
"gopkg.in/src-d/go-license-detector.v3/licensedb"
)

func main() {
@@ -6,7 +6,7 @@ import (
"testing"

"github.com/stretchr/testify/assert"
"gopkg.in/src-d/go-license-detector.v2/licensedb"
"gopkg.in/src-d/go-license-detector.v3/licensedb"
)

func TestCmdMain(t *testing.T) {
2 go.mod
@@ -1,4 +1,4 @@
module gopkg.in/src-d/go-license-detector.v2
module gopkg.in/src-d/go-license-detector.v3

require (
github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 // indirect
@@ -6,7 +6,7 @@ import (
"sort"
"sync"

"gopkg.in/src-d/go-license-detector.v2/licensedb/filer"
"gopkg.in/src-d/go-license-detector.v3/licensedb/filer"
)

// Analyse runs license analysis on each item in `args`
@@ -6,8 +6,8 @@ import (
"sync"
"testing"

"gopkg.in/src-d/go-license-detector.v2/licensedb/api"
"gopkg.in/src-d/go-license-detector.v2/licensedb/filer"
"gopkg.in/src-d/go-license-detector.v3/licensedb/api"
"gopkg.in/src-d/go-license-detector.v3/licensedb/filer"

"github.com/stretchr/testify/assert"
)
@@ -17,11 +17,11 @@ import (
"github.com/ekzhu/minhash-lsh"
"github.com/sergi/go-diff/diffmatchpatch"

"gopkg.in/src-d/go-license-detector.v2/licensedb/filer"
"gopkg.in/src-d/go-license-detector.v2/licensedb/internal/assets"
"gopkg.in/src-d/go-license-detector.v2/licensedb/internal/fastlog"
"gopkg.in/src-d/go-license-detector.v2/licensedb/internal/normalize"
"gopkg.in/src-d/go-license-detector.v2/licensedb/internal/wmh"
"gopkg.in/src-d/go-license-detector.v3/licensedb/filer"
"gopkg.in/src-d/go-license-detector.v3/licensedb/internal/assets"
"gopkg.in/src-d/go-license-detector.v3/licensedb/internal/fastlog"
"gopkg.in/src-d/go-license-detector.v3/licensedb/internal/normalize"
"gopkg.in/src-d/go-license-detector.v3/licensedb/internal/wmh"
)

var (
@@ -8,9 +8,9 @@ import (
"strings"
"sync"

"gopkg.in/src-d/go-license-detector.v2/licensedb/api"
"gopkg.in/src-d/go-license-detector.v2/licensedb/filer"
"gopkg.in/src-d/go-license-detector.v2/licensedb/internal/processors"
"gopkg.in/src-d/go-license-detector.v3/licensedb/api"
"gopkg.in/src-d/go-license-detector.v3/licensedb/filer"
"gopkg.in/src-d/go-license-detector.v3/licensedb/internal/processors"
)

var (
@@ -10,7 +10,7 @@ import (

"golang.org/x/exp/rand"
"gonum.org/v1/gonum/stat/distuv"
"gopkg.in/src-d/go-license-detector.v2/licensedb/internal/fastlog"
"gopkg.in/src-d/go-license-detector.v3/licensedb/internal/fastlog"
)

const maxUint16 = 65535
@@ -4,9 +4,9 @@ import (
"errors"
paths "path"

"gopkg.in/src-d/go-license-detector.v2/licensedb/api"
"gopkg.in/src-d/go-license-detector.v2/licensedb/filer"
"gopkg.in/src-d/go-license-detector.v2/licensedb/internal"
"gopkg.in/src-d/go-license-detector.v3/licensedb/api"
"gopkg.in/src-d/go-license-detector.v3/licensedb/filer"
"gopkg.in/src-d/go-license-detector.v3/licensedb/internal"
)

var (

0 comments on commit 7961dd6

Please sign in to comment.
You can’t perform that action at this time.