Skip to content

Commit

Permalink
update deps and move to go mod
Browse files Browse the repository at this point in the history
  • Loading branch information
frapposelli committed Aug 20, 2019
1 parent 84c9fcf commit 9df20db
Show file tree
Hide file tree
Showing 10 changed files with 79 additions and 107 deletions.
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ shared: &shared
- run: go install -v github.com/frapposelli/wwhrd
- run: wwhrd check
jobs:
"golang-1.7":
<<: *shared
docker:
- image: circleci/golang:1.7
"golang-1.8":
<<: *shared
docker:
Expand All @@ -28,9 +24,13 @@ jobs:
<<: *shared
docker:
- image: circleci/golang:1.11
"golang-1.12":
<<: *shared
docker:
- image: circleci/golang:1.12
release:
docker:
- image: circleci/golang:1.10
- image: circleci/golang:1.12
steps:
- checkout
- run: ./.circleci/docker-login.sh
Expand All @@ -39,11 +39,11 @@ workflows:
version: 2
build:
jobs:
- "golang-1.7"
- "golang-1.8"
- "golang-1.9"
- "golang-1.10"
- "golang-1.11"
- "golang-1.12"
release:
jobs:
- release:
Expand Down
1 change: 1 addition & 0 deletions .wwhrd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ whitelist:

exceptions:
- github.com/davecgh/go-spew/spew/...
- github.com/stretchr/testify/...
57 changes: 0 additions & 57 deletions Gopkg.lock

This file was deleted.

38 changes: 0 additions & 38 deletions Gopkg.toml

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@

Have Henry Rollins check vendored licenses in your Go project.

Please note that `wwhrd` **only checks** packages stored under `vendor/`.
Please note that `wwhrd` **only checks** packages stored under `vendor/`, if you are using Go modules (`go mod`), you can add `go mod vendor` before running `wwhrd`, this will dump a copy of the vendored packages inside the local repo.

## Installation

```console
$ go get -u github.com/frapposelli/wwhrd
go get -u github.com/frapposelli/wwhrd
```

Using [Brew](https://brew.sh) on macOS:

```console
$ brew install frapposelli/tap/wwhrd
brew install frapposelli/tap/wwhrd
```

## Configuration file
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ clone_folder: C:\gopath\src\github.com\frapposelli\wwhrd

environment:
GOPATH: c:\gopath
GOVERSION: 1.8
GOVERSION: 1.12

init:
- git config --global core.autocrlf input
Expand Down
6 changes: 5 additions & 1 deletion cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ func TestCliCheck(t *testing.T) {
[]string{"check", "-f", "NONEXISTENT"},
[]string{""},
[]string{""},
[]error{fmt.Errorf("Can't read config file: stat NONEXISTENT: no such file or directory"), fmt.Errorf("Can't read config file: GetFileAttributesEx NONEXISTENT: The system cannot find the file specified.")},
[]error{
fmt.Errorf("Can't read config file: stat NONEXISTENT: no such file or directory"),
fmt.Errorf("Can't read config file: GetFileAttributesEx NONEXISTENT: The system cannot find the file specified."),
fmt.Errorf("Can't read config file: CreateFile NONEXISTENT: The system cannot find the file specified."),
},
},
{
[]string{"check", "-f", ".wwhrd-botched.yml"},
Expand Down
15 changes: 15 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module github.com/frapposelli/wwhrd

go 1.12

require (
github.com/cloudfoundry-incubator/candiedyaml v0.0.0-20170223024657-cff29b469e0f
github.com/davecgh/go-spew v1.1.0 // indirect
github.com/jessevdk/go-flags v1.2.0
github.com/onsi/ginkgo v1.9.0 // indirect
github.com/onsi/gomega v1.6.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/ryanuber/go-license v0.0.0-20180405065157-c69f41c2c8d6
github.com/sirupsen/logrus v1.0.1
github.com/stretchr/testify v1.1.4
)
41 changes: 41 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
github.com/cloudfoundry-incubator/candiedyaml v0.0.0-20170223024657-cff29b469e0f h1:1eJ77aTNAIy8RRit14sC+vdwRv587u2+URvm1PMH6Yc=
github.com/cloudfoundry-incubator/candiedyaml v0.0.0-20170223024657-cff29b469e0f/go.mod h1:dOLSIXcRQJiDS1vlrYFNJicoHNZLsBKideE+70hGdV4=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/jessevdk/go-flags v1.2.0 h1:hzF3gGPUyvR8CkohvbuReyJykgogDQ5bCuNB7LIzgD4=
github.com/jessevdk/go-flags v1.2.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.9.0 h1:SZjF721BByVj8QH636/8S2DnX4n0Re3SteMmw3N+tzc=
github.com/onsi/ginkgo v1.9.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v1.6.0 h1:8XTW0fcJZEq9q+Upcyws4JSGua2MFysCL5xkaSgHc+M=
github.com/onsi/gomega v1.6.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/ryanuber/go-license v0.0.0-20180405065157-c69f41c2c8d6 h1:tRp20LMuPNq4xTO4SLHTxVySYje3m5hLlu5RZLvaY/c=
github.com/ryanuber/go-license v0.0.0-20180405065157-c69f41c2c8d6/go.mod h1:now4/sqX/LuhSGPhiBC+ZOzdbC7Ki9Dx63jcTM7ro3s=
github.com/sirupsen/logrus v1.0.1 h1:k86xHae/+DCqiP5ac5Gf0AQtH+4mg0m6vE1os/WzmJ4=
github.com/sirupsen/logrus v1.0.1/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
github.com/stretchr/testify v1.1.4 h1:ToftOQTytwshuOSj6bDSolVUa3GINfJP/fg3OkkOzQQ=
github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e h1:o3PsSEY8E4eXWkXrIP9YJALUkVZqzHJT5DOasTyn8Vs=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
8 changes: 7 additions & 1 deletion wwhrd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ func mockGoPackageDir(t *testing.T, prefix string) (dir string, rm func()) {
log.Fatal(err)
}

if err := os.MkdirAll(filepath.Join(dir, "vendor/github.com/faux/package"), 0755); err != nil {
log.Fatal(err)
}

if err := os.MkdirAll(filepath.Join(dir, "vendor/github.com/fake/nested/inside/a/package"), 0755); err != nil {
log.Fatal(err)
}
Expand All @@ -37,7 +41,9 @@ func mockGoPackageDir(t *testing.T, prefix string) (dir string, rm func()) {
{".wwhrd-exwc.yml", []byte(mockConfEXWC)},
{".wwhrd-botched.yml", []byte(mockConfBotched)},
{filepath.Join("vendor/github.com/fake/package", "mockpkg.go"), []byte(mockVendor)},
{filepath.Join("vendor/github.com/fake/package", "LICENSE"), []byte(mockLicense)},
{filepath.Join("vendor/github.com/fake/package", "LICENSE"), []byte(mockLicense)}, // American English spelling
{filepath.Join("vendor/github.com/faux/package", "mockpkg.go"), []byte(mockVendor)},
{filepath.Join("vendor/github.com/faux/package", "LICENCE"), []byte(mockLicense)}, // British English spelling
{filepath.Join("vendor/github.com/fake/nested", "LICENSE"), []byte(mockLicense)},
{filepath.Join("vendor/github.com/fake/nested/inside/a/package", "mockpkg.go"), []byte(mockVendor)},
}
Expand Down

0 comments on commit 9df20db

Please sign in to comment.