diff --git a/Gopkg.lock b/Gopkg.lock index eddb6faafbf2..bde563c99f3a 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -17,15 +17,6 @@ revision = "5d049714c4a64225c3c79a7cf7d02f7fb5b96338" version = "1.0.0" -[[projects]] - branch = "master" - digest = "1:07d5a5772acf81583937919b21bee82377499b26d68d361b48bf8afcca1b41e5" - name = "github.com/client9/misspell" - packages = ["."] - pruneopts = "UT" - revision = "950f5d19e77066a2353d9a22e89f8f889d1d7012" - source = "github.com/golangci/misspell" - [[projects]] digest = "1:a2c1d0e43bd3baaa071d1b9ed72c27d78169b2b269f71c105ac4ba34b1be4a39" name = "github.com/davecgh/go-spew" @@ -105,6 +96,32 @@ pruneopts = "UT" revision = "cfe4005ccda277a820149d44d6ededc400cc99a2" +[[projects]] + branch = "master" + digest = "1:efb8cf3f0c2f47844104d6e879fc77d846649df794e378cae50e749fad1bb1dc" + name = "github.com/golangci/dupl" + packages = [ + ".", + "job", + "printer", + "suffixtree", + "syntax", + "syntax/golang", + ] + pruneopts = "UT" + revision = "3e9179ac440a0386ac7cc9a085fc44397c6b9bbc" + +[[projects]] + branch = "master" + digest = "1:2146ed9836ab6af9cbe527299544566ee7506ca6dcd4ab71d761141c015ba174" + name = "github.com/golangci/errcheck" + packages = [ + "golangci", + "internal/errcheck", + ] + pruneopts = "UT" + revision = "f726ab79eeeb2d770a997ee4d9bce4ca674956a0" + [[projects]] branch = "master" digest = "1:f63d85b6e551b6c8aa3ed2e42b64db15f5b525bdb01fa36af18288f1de4c859b" @@ -113,6 +130,25 @@ pruneopts = "UT" revision = "927a3d87b613e9f6f0fb7ef8bb8de8b83c30a5a2" +[[projects]] + branch = "master" + digest = "1:159ec56cf5d1e0bb8c68082ccbcad9a854be7e28d3c2a20e285305ae4ca96778" + name = "github.com/golangci/go-tools" + packages = [ + "deprecated", + "functions", + "internal/sharedcheck", + "lint", + "lint/lintutil", + "simple", + "staticcheck", + "staticcheck/vrp", + "unused", + "version", + ] + pruneopts = "UT" + revision = "93eecd106a0b4f93401f91127a550709f819193d" + [[projects]] branch = "master" digest = "1:e1b9fbecb1d985f291dbca59767070fe899f38d1b40f7e9433f9a42b7fb3bd4e" @@ -171,6 +207,22 @@ pruneopts = "UT" revision = "2ee8f2867dde308c46d401d6d30f6c644094b167" +[[projects]] + branch = "master" + digest = "1:8a043d165b607fada34aceb22e8f5d1fb80871f5b2d6c3e5d5933c37094c9228" + name = "github.com/golangci/interfacer" + packages = ["check"] + pruneopts = "UT" + revision = "01958817a6ec5bb4bb01d0b9a5f3fca30923ebbf" + +[[projects]] + branch = "master" + digest = "1:59b6cfe4fe54ed13f7570c74b2581100ad6f65cf421b3d5c992d863b238fbc39" + name = "github.com/golangci/lint" + packages = ["."] + pruneopts = "UT" + revision = "c2187e7932b5ee7899eaa2e83bcf00e251abd274" + [[projects]] branch = "master" digest = "1:fdc1b377c447d5168fc335f30de8d55333ccebfa64ce97b9e03b6cb1ce14b178" @@ -187,6 +239,14 @@ pruneopts = "UT" revision = "b1d89398deca2fd3f8578e5a9551e819bd01ca5f" +[[projects]] + branch = "master" + digest = "1:07d5a5772acf81583937919b21bee82377499b26d68d361b48bf8afcca1b41e5" + name = "github.com/golangci/misspell" + packages = ["."] + pruneopts = "UT" + revision = "950f5d19e77066a2353d9a22e89f8f889d1d7012" + [[projects]] branch = "master" digest = "1:6bc38b03a76ac4ce44482b437c6a31ec441e494abd271d63722f99ac2e7e9e80" @@ -203,6 +263,21 @@ pruneopts = "UT" revision = "d9c87f5ffaf08801898f780cf66e7026e2174097" +[[projects]] + branch = "master" + digest = "1:ba7223001c6b9de88a3e5beb6e441b3d559e09e3e9bc8ff866b2c0e72a6f7f8f" + name = "github.com/golangci/tools" + packages = [ + "go/callgraph", + "go/callgraph/cha", + "go/callgraph/rta", + "go/callgraph/static", + "go/ssa", + "go/ssa/ssautil", + ] + pruneopts = "UT" + revision = "98e75f53b4b9b9243ddc6f08b76f7682294b53b5" + [[projects]] branch = "master" digest = "1:c553e7c7483f2d6db1e84a27a18df144ed4041792d7556916369f86ccf5409fe" @@ -211,6 +286,14 @@ pruneopts = "UT" revision = "28b1c447d1f4a810737ee6ab40ea6c1d0ceae4ad" +[[projects]] + branch = "master" + digest = "1:5b3fb341e79acec135f1241e4d72b9a8231f705852f752142fb800115f50ba80" + name = "github.com/golangci/unparam" + packages = ["check"] + pruneopts = "UT" + revision = "ff2498c2efa8282b1d7511cad18904a47a460782" + [[projects]] branch = "master" digest = "1:a361611b8c8c75a1091f00027767f7779b29cb37c456a71b8f2604c88057ab40" @@ -238,18 +321,6 @@ revision = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75" version = "v1.0" -[[projects]] - branch = "master" - digest = "1:92ecd3161b2baa430167882933fd9a62f997242b7689cc867f7bfc09322c79fb" - name = "github.com/kisielk/errcheck" - packages = [ - "golangci", - "internal/errcheck", - ] - pruneopts = "UT" - revision = "46cecd339393da3e3742fc0045eb5e5ec0dd6563" - source = "github.com/golangci/errcheck" - [[projects]] digest = "1:15ec2166e33ef6c60b344a04d050eec79193517e7f5082b6233b2d09ef0d10b8" name = "github.com/kisielk/gotool" @@ -285,22 +356,6 @@ revision = "0360b2af4f38e8d38c7fce2a9f4e702702d73a39" version = "v0.0.3" -[[projects]] - branch = "master" - digest = "1:5cb872835e9779d6daff8541d29c5f6e97faa0fea04d35cc19441dcfb0ddf632" - name = "github.com/mibk/dupl" - packages = [ - ".", - "job", - "printer", - "suffixtree", - "syntax", - "syntax/golang", - ] - pruneopts = "UT" - revision = "53b9af5a45362a6f2896cfa39cc17d17ba9667ea" - source = "github.com/golangci/dupl" - [[projects]] branch = "master" digest = "1:d0c95a34e79df79eb96ca870d6b6fc43361d34c9c05495f93a5ad0077f7bbb24" @@ -494,27 +549,21 @@ [[projects]] branch = "master" - digest = "1:47357b70bddc05651ec8cf40328574158264e199908fc6d952ffb4c18934fd54" + digest = "1:1c24352e1722a8954fe7c95bcb12d878ef9883b01fe3e0e801f62e8cbf9621a0" name = "golang.org/x/tools" packages = [ "go/ast/astutil", "go/buildutil", - "go/callgraph", - "go/callgraph/cha", - "go/callgraph/rta", - "go/callgraph/static", "go/gcexportdata", + "go/internal/cgo", "go/internal/gcimporter", "go/loader", - "go/ssa", - "go/ssa/ssautil", "go/types/typeutil", "imports", "internal/fastwalk", ] pruneopts = "UT" - revision = "1b5a18146dea803d40d194b191359600da91665a" - source = "github.com/golangci/tools" + revision = "7ca132754999accbaa5c1735eda29e7ce0f3bf03" [[projects]] digest = "1:342378ac4dcb378a5448dd723f0784ae519383532f5e70ade24132c4c8693202" @@ -524,51 +573,6 @@ revision = "5420a8b6744d3b0345ab293f6fcba19c978f1183" version = "v2.2.1" -[[projects]] - branch = "master" - digest = "1:dd3808d5bdd7dfdbfe9b7412aa59b0a4c6fc6d9e3db25ba75465cc86e10def59" - name = "honnef.co/go/tools" - packages = [ - "deprecated", - "functions", - "internal/sharedcheck", - "lint", - "lint/lintutil", - "simple", - "staticcheck", - "staticcheck/vrp", - "unused", - "version", - ] - pruneopts = "UT" - revision = "986cd2acf8dbf500b75aef5636a8107de6044e63" - source = "github.com/golangci/go-tools" - -[[projects]] - branch = "master" - digest = "1:ef98efcb9462d27d251466fdc89656c5dbc28f4dc6b428a4270c3ba668ea412d" - name = "mvdan.cc/interfacer" - packages = ["check"] - pruneopts = "UT" - revision = "822e100dd73a2677e406ccc437efdb4a82e67033" - -[[projects]] - branch = "master" - digest = "1:521f15c98723cb42db85f5b83980ffa5f707ddaff12976a0d366e6a6cdd1f791" - name = "mvdan.cc/lint" - packages = ["."] - pruneopts = "UT" - revision = "adc824a0674b99099789b6188a058d485eaf61c0" - -[[projects]] - branch = "fix-crash-on-nil-constant" - digest = "1:f3f31fed50be4dad26688c0466c4d92de015ce4a3c0aa7e01b55326a77d1bf40" - name = "mvdan.cc/unparam" - packages = ["check"] - pruneopts = "UT" - revision = "f30d69ad8b55690d0e814cdd96e955834e0d0ee1" - source = "github.com/golangci/unparam" - [[projects]] branch = "master" digest = "1:6a26dcb8f66d1110d3fa7b1cd097e450631bcd4f7a59a417b0f20d2646934a4a" @@ -590,12 +594,18 @@ analyzer-version = 1 input-imports = [ "github.com/OpenPeeDeeP/depguard", - "github.com/client9/misspell", "github.com/fatih/color", "github.com/golang/mock/gomock", "github.com/golangci/check/cmd/structcheck", "github.com/golangci/check/cmd/varcheck", + "github.com/golangci/dupl", + "github.com/golangci/errcheck/golangci", "github.com/golangci/go-misc/deadcode", + "github.com/golangci/go-tools/lint", + "github.com/golangci/go-tools/lint/lintutil", + "github.com/golangci/go-tools/simple", + "github.com/golangci/go-tools/staticcheck", + "github.com/golangci/go-tools/unused", "github.com/golangci/goconst", "github.com/golangci/gocyclo/pkg/gocyclo", "github.com/golangci/gofmt/gofmt", @@ -604,14 +614,17 @@ "github.com/golangci/gosec/rules", "github.com/golangci/govet", "github.com/golangci/ineffassign", + "github.com/golangci/interfacer/check", "github.com/golangci/lint-1", "github.com/golangci/maligned", + "github.com/golangci/misspell", "github.com/golangci/prealloc", "github.com/golangci/revgrep", + "github.com/golangci/tools/go/ssa", + "github.com/golangci/tools/go/ssa/ssautil", "github.com/golangci/unconvert", - "github.com/kisielk/errcheck/golangci", + "github.com/golangci/unparam/check", "github.com/mattn/go-colorable", - "github.com/mibk/dupl", "github.com/mitchellh/go-ps", "github.com/pkg/errors", "github.com/shirou/gopsutil/process", @@ -621,15 +634,6 @@ "github.com/spf13/viper", "github.com/stretchr/testify/assert", "golang.org/x/tools/go/loader", - "golang.org/x/tools/go/ssa", - "golang.org/x/tools/go/ssa/ssautil", - "honnef.co/go/tools/lint", - "honnef.co/go/tools/lint/lintutil", - "honnef.co/go/tools/simple", - "honnef.co/go/tools/staticcheck", - "honnef.co/go/tools/unused", - "mvdan.cc/interfacer/check", - "mvdan.cc/unparam/check", "sourcegraph.com/sourcegraph/go-diff/diff", ] solver-name = "gps-cdcl" diff --git a/Gopkg.toml b/Gopkg.toml index a319946bca38..87a863bd1f5f 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -10,25 +10,10 @@ branch = "master" name = "sourcegraph.com/sourcegraph/go-diff" -[[constraint]] - name = "github.com/kisielk/errcheck" - branch = "master" - source = "github.com/golangci/errcheck" - [[constraint]] name = "github.com/golangci/govet" branch = "master" -[[constraint]] - name = "github.com/mibk/dupl" - branch = "master" - source = "github.com/golangci/dupl" - -[[constraint]] - name = "mvdan.cc/unparam" - branch = "fix-crash-on-nil-constant" - source = "github.com/golangci/unparam" - [prune] go-tests = true unused-packages = true @@ -79,15 +64,4 @@ [[constraint]] branch = "master" - name = "golang.org/x/tools" - source = "github.com/golangci/tools" - -[[constraint]] - branch = "master" - name = "honnef.co/go/tools" - source = "github.com/golangci/go-tools" - -[[constraint]] - branch = "master" - name = "github.com/client9/misspell" - source = "github.com/golangci/misspell" \ No newline at end of file + name = "github.com/golangci/unparam" diff --git a/pkg/golinters/dupl.go b/pkg/golinters/dupl.go index dcabdbe9580d..f48c32afc579 100644 --- a/pkg/golinters/dupl.go +++ b/pkg/golinters/dupl.go @@ -5,9 +5,9 @@ import ( "fmt" "go/token" + duplAPI "github.com/golangci/dupl" "github.com/golangci/golangci-lint/pkg/lint/linter" "github.com/golangci/golangci-lint/pkg/result" - duplAPI "github.com/mibk/dupl" ) type Dupl struct{} diff --git a/pkg/golinters/errcheck.go b/pkg/golinters/errcheck.go index 5e8cde4c182e..1cf93d9e6b0b 100644 --- a/pkg/golinters/errcheck.go +++ b/pkg/golinters/errcheck.go @@ -4,9 +4,9 @@ import ( "context" "fmt" + errcheckAPI "github.com/golangci/errcheck/golangci" "github.com/golangci/golangci-lint/pkg/lint/linter" "github.com/golangci/golangci-lint/pkg/result" - errcheckAPI "github.com/kisielk/errcheck/golangci" ) type Errcheck struct{} diff --git a/pkg/golinters/interfacer.go b/pkg/golinters/interfacer.go index 7395706ff02d..b8f7f8c4b026 100644 --- a/pkg/golinters/interfacer.go +++ b/pkg/golinters/interfacer.go @@ -3,7 +3,7 @@ package golinters import ( "context" - "mvdan.cc/interfacer/check" + "github.com/golangci/interfacer/check" "github.com/golangci/golangci-lint/pkg/lint/linter" "github.com/golangci/golangci-lint/pkg/result" diff --git a/pkg/golinters/megacheck.go b/pkg/golinters/megacheck.go index 17245c32c4d0..1e03a8f63554 100644 --- a/pkg/golinters/megacheck.go +++ b/pkg/golinters/megacheck.go @@ -6,13 +6,13 @@ import ( "fmt" "strings" + "github.com/golangci/go-tools/lint" + "github.com/golangci/go-tools/lint/lintutil" + "github.com/golangci/go-tools/simple" + "github.com/golangci/go-tools/staticcheck" + "github.com/golangci/go-tools/unused" + "github.com/golangci/tools/go/ssa" "golang.org/x/tools/go/loader" - "golang.org/x/tools/go/ssa" - "honnef.co/go/tools/lint" - "honnef.co/go/tools/lint/lintutil" - "honnef.co/go/tools/simple" - "honnef.co/go/tools/staticcheck" - "honnef.co/go/tools/unused" "github.com/golangci/golangci-lint/pkg/fsutils" "github.com/golangci/golangci-lint/pkg/lint/linter" diff --git a/pkg/golinters/misspell.go b/pkg/golinters/misspell.go index 8ae6dfb94997..896134a5d71f 100644 --- a/pkg/golinters/misspell.go +++ b/pkg/golinters/misspell.go @@ -7,9 +7,9 @@ import ( "io/ioutil" "strings" - "github.com/client9/misspell" "github.com/golangci/golangci-lint/pkg/lint/linter" "github.com/golangci/golangci-lint/pkg/result" + "github.com/golangci/misspell" ) type Misspell struct{} diff --git a/pkg/golinters/unparam.go b/pkg/golinters/unparam.go index 472c3361b997..ffc6917c268a 100644 --- a/pkg/golinters/unparam.go +++ b/pkg/golinters/unparam.go @@ -5,7 +5,7 @@ import ( "github.com/golangci/golangci-lint/pkg/lint/linter" "github.com/golangci/golangci-lint/pkg/result" - "mvdan.cc/unparam/check" + "github.com/golangci/unparam/check" ) type Unparam struct{} diff --git a/pkg/lint/linter/context.go b/pkg/lint/linter/context.go index f6275e96e286..4788ce0edab1 100644 --- a/pkg/lint/linter/context.go +++ b/pkg/lint/linter/context.go @@ -5,8 +5,8 @@ import ( "github.com/golangci/golangci-lint/pkg/lint/astcache" "github.com/golangci/golangci-lint/pkg/logutils" "github.com/golangci/golangci-lint/pkg/packages" + "github.com/golangci/tools/go/ssa" "golang.org/x/tools/go/loader" - "golang.org/x/tools/go/ssa" ) type Context struct { diff --git a/pkg/lint/load.go b/pkg/lint/load.go index bd0271c47b06..0548411cff50 100644 --- a/pkg/lint/load.go +++ b/pkg/lint/load.go @@ -19,9 +19,9 @@ import ( "github.com/golangci/golangci-lint/pkg/lint/astcache" "github.com/golangci/golangci-lint/pkg/lint/linter" "github.com/golangci/golangci-lint/pkg/packages" + "github.com/golangci/tools/go/ssa" + "github.com/golangci/tools/go/ssa/ssautil" "golang.org/x/tools/go/loader" - "golang.org/x/tools/go/ssa" - "golang.org/x/tools/go/ssa/ssautil" ) var loadDebugf = logutils.Debug("load") diff --git a/vendor/github.com/mibk/dupl/.travis.yml b/vendor/github.com/golangci/dupl/.travis.yml similarity index 100% rename from vendor/github.com/mibk/dupl/.travis.yml rename to vendor/github.com/golangci/dupl/.travis.yml diff --git a/vendor/github.com/mibk/dupl/LICENSE b/vendor/github.com/golangci/dupl/LICENSE similarity index 100% rename from vendor/github.com/mibk/dupl/LICENSE rename to vendor/github.com/golangci/dupl/LICENSE diff --git a/vendor/github.com/mibk/dupl/README.md b/vendor/github.com/golangci/dupl/README.md similarity index 95% rename from vendor/github.com/mibk/dupl/README.md rename to vendor/github.com/golangci/dupl/README.md index 4267fe23d8c9..f34901d7ac4d 100644 --- a/vendor/github.com/mibk/dupl/README.md +++ b/vendor/github.com/golangci/dupl/README.md @@ -12,7 +12,7 @@ tokens are completely different). ## Installation ```bash -go get -u github.com/mibk/dupl +go get -u github.com/golangci/dupl ``` ## Usage @@ -56,7 +56,7 @@ Examples: ## Example The reduced output of this command with the following parameters for the [Docker](https://www.docker.com) source code -looks like [this](http://htmlpreview.github.io/?https://github.com/mibk/dupl/blob/master/_output_example/docker.html). +looks like [this](http://htmlpreview.github.io/?https://github.com/golangci/dupl/blob/master/_output_example/docker.html). ```bash $ dupl -t 200 -html >docker.html diff --git a/vendor/github.com/mibk/dupl/job/buildtree.go b/vendor/github.com/golangci/dupl/job/buildtree.go similarity index 83% rename from vendor/github.com/mibk/dupl/job/buildtree.go rename to vendor/github.com/golangci/dupl/job/buildtree.go index 2a18e950466a..e9aad54c0f6c 100644 --- a/vendor/github.com/mibk/dupl/job/buildtree.go +++ b/vendor/github.com/golangci/dupl/job/buildtree.go @@ -1,8 +1,8 @@ package job import ( - "github.com/mibk/dupl/suffixtree" - "github.com/mibk/dupl/syntax" + "github.com/golangci/dupl/suffixtree" + "github.com/golangci/dupl/syntax" ) func BuildTree(schan chan []*syntax.Node) (t *suffixtree.STree, d *[]*syntax.Node, done chan bool) { diff --git a/vendor/github.com/mibk/dupl/job/parse.go b/vendor/github.com/golangci/dupl/job/parse.go similarity index 86% rename from vendor/github.com/mibk/dupl/job/parse.go rename to vendor/github.com/golangci/dupl/job/parse.go index ca14e82aa469..eb9d7c6255d4 100644 --- a/vendor/github.com/mibk/dupl/job/parse.go +++ b/vendor/github.com/golangci/dupl/job/parse.go @@ -3,8 +3,8 @@ package job import ( "log" - "github.com/mibk/dupl/syntax" - "github.com/mibk/dupl/syntax/golang" + "github.com/golangci/dupl/syntax" + "github.com/golangci/dupl/syntax/golang" ) func Parse(fchan chan string) chan []*syntax.Node { diff --git a/vendor/github.com/mibk/dupl/main.go b/vendor/github.com/golangci/dupl/main.go similarity index 96% rename from vendor/github.com/mibk/dupl/main.go rename to vendor/github.com/golangci/dupl/main.go index 02750c36b710..3030a97aec52 100644 --- a/vendor/github.com/mibk/dupl/main.go +++ b/vendor/github.com/golangci/dupl/main.go @@ -8,9 +8,9 @@ import ( "path/filepath" "sort" - "github.com/mibk/dupl/job" - "github.com/mibk/dupl/printer" - "github.com/mibk/dupl/syntax" + "github.com/golangci/dupl/job" + "github.com/golangci/dupl/printer" + "github.com/golangci/dupl/syntax" ) const defaultThreshold = 15 diff --git a/vendor/github.com/mibk/dupl/printer/html.go b/vendor/github.com/golangci/dupl/printer/html.go similarity index 98% rename from vendor/github.com/mibk/dupl/printer/html.go rename to vendor/github.com/golangci/dupl/printer/html.go index 667f0437c109..5ad9e25c7f7c 100644 --- a/vendor/github.com/mibk/dupl/printer/html.go +++ b/vendor/github.com/golangci/dupl/printer/html.go @@ -7,7 +7,7 @@ import ( "regexp" "sort" - "github.com/mibk/dupl/syntax" + "github.com/golangci/dupl/syntax" ) type html struct { diff --git a/vendor/github.com/mibk/dupl/printer/plumbing.go b/vendor/github.com/golangci/dupl/printer/plumbing.go similarity index 95% rename from vendor/github.com/mibk/dupl/printer/plumbing.go rename to vendor/github.com/golangci/dupl/printer/plumbing.go index 284213cd5cdb..cf39d01b78d3 100644 --- a/vendor/github.com/mibk/dupl/printer/plumbing.go +++ b/vendor/github.com/golangci/dupl/printer/plumbing.go @@ -3,7 +3,7 @@ package printer import ( "sort" - "github.com/mibk/dupl/syntax" + "github.com/golangci/dupl/syntax" ) type Clone clone diff --git a/vendor/github.com/mibk/dupl/printer/printer.go b/vendor/github.com/golangci/dupl/printer/printer.go similarity index 81% rename from vendor/github.com/mibk/dupl/printer/printer.go rename to vendor/github.com/golangci/dupl/printer/printer.go index 855ca0990959..385217bfc196 100644 --- a/vendor/github.com/mibk/dupl/printer/printer.go +++ b/vendor/github.com/golangci/dupl/printer/printer.go @@ -1,6 +1,6 @@ package printer -import "github.com/mibk/dupl/syntax" +import "github.com/golangci/dupl/syntax" type ReadFile func(filename string) ([]byte, error) diff --git a/vendor/github.com/mibk/dupl/printer/text.go b/vendor/github.com/golangci/dupl/printer/text.go similarity index 98% rename from vendor/github.com/mibk/dupl/printer/text.go rename to vendor/github.com/golangci/dupl/printer/text.go index f8a1071b11e4..8359fa76f49e 100644 --- a/vendor/github.com/mibk/dupl/printer/text.go +++ b/vendor/github.com/golangci/dupl/printer/text.go @@ -5,7 +5,7 @@ import ( "io" "sort" - "github.com/mibk/dupl/syntax" + "github.com/golangci/dupl/syntax" ) type text struct { diff --git a/vendor/github.com/mibk/dupl/suffixtree/dupl.go b/vendor/github.com/golangci/dupl/suffixtree/dupl.go similarity index 100% rename from vendor/github.com/mibk/dupl/suffixtree/dupl.go rename to vendor/github.com/golangci/dupl/suffixtree/dupl.go diff --git a/vendor/github.com/mibk/dupl/suffixtree/suffixtree.go b/vendor/github.com/golangci/dupl/suffixtree/suffixtree.go similarity index 100% rename from vendor/github.com/mibk/dupl/suffixtree/suffixtree.go rename to vendor/github.com/golangci/dupl/suffixtree/suffixtree.go diff --git a/vendor/github.com/mibk/dupl/syntax/golang/golang.go b/vendor/github.com/golangci/dupl/syntax/golang/golang.go similarity index 99% rename from vendor/github.com/mibk/dupl/syntax/golang/golang.go rename to vendor/github.com/golangci/dupl/syntax/golang/golang.go index 8cc304f48de9..a0b1e77e13fc 100644 --- a/vendor/github.com/mibk/dupl/syntax/golang/golang.go +++ b/vendor/github.com/golangci/dupl/syntax/golang/golang.go @@ -5,7 +5,7 @@ import ( "go/parser" "go/token" - "github.com/mibk/dupl/syntax" + "github.com/golangci/dupl/syntax" ) const ( diff --git a/vendor/github.com/mibk/dupl/syntax/syntax.go b/vendor/github.com/golangci/dupl/syntax/syntax.go similarity index 98% rename from vendor/github.com/mibk/dupl/syntax/syntax.go rename to vendor/github.com/golangci/dupl/syntax/syntax.go index 9d737b68ed43..e2c750afd52d 100644 --- a/vendor/github.com/mibk/dupl/syntax/syntax.go +++ b/vendor/github.com/golangci/dupl/syntax/syntax.go @@ -3,7 +3,7 @@ package syntax import ( "crypto/sha1" - "github.com/mibk/dupl/suffixtree" + "github.com/golangci/dupl/suffixtree" ) type Node struct { diff --git a/vendor/github.com/kisielk/errcheck/LICENSE b/vendor/github.com/golangci/errcheck/LICENSE similarity index 100% rename from vendor/github.com/kisielk/errcheck/LICENSE rename to vendor/github.com/golangci/errcheck/LICENSE diff --git a/vendor/github.com/kisielk/errcheck/golangci/golangci.go b/vendor/github.com/golangci/errcheck/golangci/golangci.go similarity index 94% rename from vendor/github.com/kisielk/errcheck/golangci/golangci.go rename to vendor/github.com/golangci/errcheck/golangci/golangci.go index 314b489aa6b6..4a11bc8a0d91 100644 --- a/vendor/github.com/kisielk/errcheck/golangci/golangci.go +++ b/vendor/github.com/golangci/errcheck/golangci/golangci.go @@ -3,7 +3,7 @@ package golangci import ( "regexp" - "github.com/kisielk/errcheck/internal/errcheck" + "github.com/golangci/errcheck/internal/errcheck" "golang.org/x/tools/go/loader" ) diff --git a/vendor/github.com/kisielk/errcheck/internal/errcheck/errcheck.go b/vendor/github.com/golangci/errcheck/internal/errcheck/errcheck.go similarity index 100% rename from vendor/github.com/kisielk/errcheck/internal/errcheck/errcheck.go rename to vendor/github.com/golangci/errcheck/internal/errcheck/errcheck.go diff --git a/vendor/honnef.co/go/tools/LICENSE b/vendor/github.com/golangci/go-tools/LICENSE similarity index 100% rename from vendor/honnef.co/go/tools/LICENSE rename to vendor/github.com/golangci/go-tools/LICENSE diff --git a/vendor/honnef.co/go/tools/deprecated/stdlib.go b/vendor/github.com/golangci/go-tools/deprecated/stdlib.go similarity index 100% rename from vendor/honnef.co/go/tools/deprecated/stdlib.go rename to vendor/github.com/golangci/go-tools/deprecated/stdlib.go diff --git a/vendor/honnef.co/go/tools/functions/concrete.go b/vendor/github.com/golangci/go-tools/functions/concrete.go similarity index 97% rename from vendor/honnef.co/go/tools/functions/concrete.go rename to vendor/github.com/golangci/go-tools/functions/concrete.go index 7d2fb4d32d56..7cd720261182 100644 --- a/vendor/honnef.co/go/tools/functions/concrete.go +++ b/vendor/github.com/golangci/go-tools/functions/concrete.go @@ -4,7 +4,7 @@ import ( "go/token" "go/types" - "golang.org/x/tools/go/ssa" + "github.com/golangci/tools/go/ssa" ) func concreteReturnTypes(fn *ssa.Function) []*types.Tuple { diff --git a/vendor/honnef.co/go/tools/functions/functions.go b/vendor/github.com/golangci/go-tools/functions/functions.go similarity index 95% rename from vendor/honnef.co/go/tools/functions/functions.go rename to vendor/github.com/golangci/go-tools/functions/functions.go index 84e76061f7f3..1f2a4bdf9f2a 100644 --- a/vendor/honnef.co/go/tools/functions/functions.go +++ b/vendor/github.com/golangci/go-tools/functions/functions.go @@ -4,10 +4,10 @@ import ( "go/types" "sync" - "golang.org/x/tools/go/callgraph" - "golang.org/x/tools/go/callgraph/static" - "golang.org/x/tools/go/ssa" - "honnef.co/go/tools/staticcheck/vrp" + "github.com/golangci/tools/go/callgraph" + "github.com/golangci/tools/go/callgraph/static" + "github.com/golangci/tools/go/ssa" + "github.com/golangci/go-tools/staticcheck/vrp" ) var stdlibDescs = map[string]Description{ diff --git a/vendor/honnef.co/go/tools/functions/loops.go b/vendor/github.com/golangci/go-tools/functions/loops.go similarity index 95% rename from vendor/honnef.co/go/tools/functions/loops.go rename to vendor/github.com/golangci/go-tools/functions/loops.go index 770c137c6671..23c0b16c8106 100644 --- a/vendor/honnef.co/go/tools/functions/loops.go +++ b/vendor/github.com/golangci/go-tools/functions/loops.go @@ -1,6 +1,6 @@ package functions -import "golang.org/x/tools/go/ssa" +import "github.com/golangci/tools/go/ssa" type Loop map[*ssa.BasicBlock]bool diff --git a/vendor/honnef.co/go/tools/functions/pure.go b/vendor/github.com/golangci/go-tools/functions/pure.go similarity index 95% rename from vendor/honnef.co/go/tools/functions/pure.go rename to vendor/github.com/golangci/go-tools/functions/pure.go index e315af9f6762..3b20ac654410 100644 --- a/vendor/honnef.co/go/tools/functions/pure.go +++ b/vendor/github.com/golangci/go-tools/functions/pure.go @@ -4,9 +4,9 @@ import ( "go/token" "go/types" - "golang.org/x/tools/go/callgraph" - "golang.org/x/tools/go/ssa" - "honnef.co/go/tools/lint" + "github.com/golangci/tools/go/callgraph" + "github.com/golangci/tools/go/ssa" + "github.com/golangci/go-tools/lint" ) // IsStub reports whether a function is a stub. A function is diff --git a/vendor/honnef.co/go/tools/functions/terminates.go b/vendor/github.com/golangci/go-tools/functions/terminates.go similarity index 92% rename from vendor/honnef.co/go/tools/functions/terminates.go rename to vendor/github.com/golangci/go-tools/functions/terminates.go index e54d4272c870..500d5531403d 100644 --- a/vendor/honnef.co/go/tools/functions/terminates.go +++ b/vendor/github.com/golangci/go-tools/functions/terminates.go @@ -1,6 +1,6 @@ package functions -import "golang.org/x/tools/go/ssa" +import "github.com/golangci/tools/go/ssa" // terminates reports whether fn is supposed to return, that is if it // has at least one theoretic path that returns from the function. diff --git a/vendor/honnef.co/go/tools/gcsizes/LICENSE b/vendor/github.com/golangci/go-tools/gcsizes/LICENSE similarity index 100% rename from vendor/honnef.co/go/tools/gcsizes/LICENSE rename to vendor/github.com/golangci/go-tools/gcsizes/LICENSE diff --git a/vendor/honnef.co/go/tools/internal/sharedcheck/lint.go b/vendor/github.com/golangci/go-tools/internal/sharedcheck/lint.go similarity index 95% rename from vendor/honnef.co/go/tools/internal/sharedcheck/lint.go rename to vendor/github.com/golangci/go-tools/internal/sharedcheck/lint.go index 14e72d371432..6f124ba9a2e3 100644 --- a/vendor/honnef.co/go/tools/internal/sharedcheck/lint.go +++ b/vendor/github.com/golangci/go-tools/internal/sharedcheck/lint.go @@ -4,8 +4,8 @@ import ( "go/ast" "go/types" - "honnef.co/go/tools/lint" - "golang.org/x/tools/go/ssa" + "github.com/golangci/go-tools/lint" + "github.com/golangci/tools/go/ssa" ) func CheckRangeStringRunes(nodeFns map[ast.Node]*ssa.Function, j *lint.Job) { diff --git a/vendor/honnef.co/go/tools/lint/LICENSE b/vendor/github.com/golangci/go-tools/lint/LICENSE similarity index 100% rename from vendor/honnef.co/go/tools/lint/LICENSE rename to vendor/github.com/golangci/go-tools/lint/LICENSE diff --git a/vendor/honnef.co/go/tools/lint/lint.go b/vendor/github.com/golangci/go-tools/lint/lint.go similarity index 99% rename from vendor/honnef.co/go/tools/lint/lint.go rename to vendor/github.com/golangci/go-tools/lint/lint.go index 21bbb7d127ed..2a12073ac1d7 100644 --- a/vendor/honnef.co/go/tools/lint/lint.go +++ b/vendor/github.com/golangci/go-tools/lint/lint.go @@ -5,7 +5,7 @@ // https://developers.google.com/open-source/licenses/bsd. // Package lint provides the foundation for tools like gosimple. -package lint // import "honnef.co/go/tools/lint" +package lint // import "github.com/golangci/go-tools/lint" import ( "bytes" @@ -25,8 +25,8 @@ import ( "golang.org/x/tools/go/ast/astutil" "golang.org/x/tools/go/loader" - "golang.org/x/tools/go/ssa" - "golang.org/x/tools/go/ssa/ssautil" + "github.com/golangci/tools/go/ssa" + "github.com/golangci/tools/go/ssa/ssautil" ) type Job struct { diff --git a/vendor/honnef.co/go/tools/lint/lintutil/util.go b/vendor/github.com/golangci/go-tools/lint/lintutil/util.go similarity index 97% rename from vendor/honnef.co/go/tools/lint/lintutil/util.go rename to vendor/github.com/golangci/go-tools/lint/lintutil/util.go index a67e98f2c0da..da2c753f73d6 100644 --- a/vendor/honnef.co/go/tools/lint/lintutil/util.go +++ b/vendor/github.com/golangci/go-tools/lint/lintutil/util.go @@ -5,7 +5,7 @@ // https://developers.google.com/open-source/licenses/bsd. // Package lintutil provides helpers for writing linter command lines. -package lintutil // import "honnef.co/go/tools/lint/lintutil" +package lintutil // import "github.com/golangci/go-tools/lint/lintutil" import ( "encoding/json" @@ -20,9 +20,9 @@ import ( "strconv" "strings" - "honnef.co/go/tools/lint" - "golang.org/x/tools/go/ssa" - "honnef.co/go/tools/version" + "github.com/golangci/go-tools/lint" + "github.com/golangci/tools/go/ssa" + "github.com/golangci/go-tools/version" "golang.org/x/tools/go/loader" ) diff --git a/vendor/honnef.co/go/tools/simple/CONTRIBUTING.md b/vendor/github.com/golangci/go-tools/simple/CONTRIBUTING.md similarity index 89% rename from vendor/honnef.co/go/tools/simple/CONTRIBUTING.md rename to vendor/github.com/golangci/go-tools/simple/CONTRIBUTING.md index c54c6c50ac95..105023cf513a 100644 --- a/vendor/honnef.co/go/tools/simple/CONTRIBUTING.md +++ b/vendor/github.com/golangci/go-tools/simple/CONTRIBUTING.md @@ -6,7 +6,7 @@ Check you have the latest version of its dependencies. Run ``` -go get -u honnef.co/go/tools/simple +go get -u github.com/golangci/go-tools/simple ``` If you still have problems, consider searching for existing issues before filing a new issue. diff --git a/vendor/honnef.co/go/tools/simple/lint.go b/vendor/github.com/golangci/go-tools/simple/lint.go similarity index 99% rename from vendor/honnef.co/go/tools/simple/lint.go rename to vendor/github.com/golangci/go-tools/simple/lint.go index daabb1c1cb08..6c509c2454f9 100644 --- a/vendor/honnef.co/go/tools/simple/lint.go +++ b/vendor/github.com/golangci/go-tools/simple/lint.go @@ -1,5 +1,5 @@ // Package simple contains a linter for Go source code. -package simple // import "honnef.co/go/tools/simple" +package simple // import "github.com/golangci/go-tools/simple" import ( "go/ast" @@ -9,9 +9,9 @@ import ( "reflect" "strings" - "honnef.co/go/tools/internal/sharedcheck" - "honnef.co/go/tools/lint" - "golang.org/x/tools/go/ssa" + "github.com/golangci/go-tools/internal/sharedcheck" + "github.com/golangci/go-tools/lint" + "github.com/golangci/tools/go/ssa" "golang.org/x/tools/go/types/typeutil" ) diff --git a/vendor/honnef.co/go/tools/simple/lint17.go b/vendor/github.com/golangci/go-tools/simple/lint17.go similarity index 100% rename from vendor/honnef.co/go/tools/simple/lint17.go rename to vendor/github.com/golangci/go-tools/simple/lint17.go diff --git a/vendor/honnef.co/go/tools/simple/lint18.go b/vendor/github.com/golangci/go-tools/simple/lint18.go similarity index 100% rename from vendor/honnef.co/go/tools/simple/lint18.go rename to vendor/github.com/golangci/go-tools/simple/lint18.go diff --git a/vendor/honnef.co/go/tools/staticcheck/CONTRIBUTING.md b/vendor/github.com/golangci/go-tools/staticcheck/CONTRIBUTING.md similarity index 88% rename from vendor/honnef.co/go/tools/staticcheck/CONTRIBUTING.md rename to vendor/github.com/golangci/go-tools/staticcheck/CONTRIBUTING.md index b12c7afc748e..42573b78be0f 100644 --- a/vendor/honnef.co/go/tools/staticcheck/CONTRIBUTING.md +++ b/vendor/github.com/golangci/go-tools/staticcheck/CONTRIBUTING.md @@ -6,7 +6,7 @@ Check you have the latest version of its dependencies. Run ``` -go get -u honnef.co/go/tools/staticcheck +go get -u github.com/golangci/go-tools/staticcheck ``` If you still have problems, consider searching for existing issues before filing a new issue. diff --git a/vendor/honnef.co/go/tools/staticcheck/buildtag.go b/vendor/github.com/golangci/go-tools/staticcheck/buildtag.go similarity index 91% rename from vendor/honnef.co/go/tools/staticcheck/buildtag.go rename to vendor/github.com/golangci/go-tools/staticcheck/buildtag.go index 27c31c09990f..c0160d5dba16 100644 --- a/vendor/honnef.co/go/tools/staticcheck/buildtag.go +++ b/vendor/github.com/golangci/go-tools/staticcheck/buildtag.go @@ -4,7 +4,7 @@ import ( "go/ast" "strings" - "honnef.co/go/tools/lint" + "github.com/golangci/go-tools/lint" ) func buildTags(f *ast.File) [][]string { diff --git a/vendor/honnef.co/go/tools/staticcheck/lint.go b/vendor/github.com/golangci/go-tools/staticcheck/lint.go similarity index 99% rename from vendor/honnef.co/go/tools/staticcheck/lint.go rename to vendor/github.com/golangci/go-tools/staticcheck/lint.go index 16c769e8994f..27ab798357f9 100644 --- a/vendor/honnef.co/go/tools/staticcheck/lint.go +++ b/vendor/github.com/golangci/go-tools/staticcheck/lint.go @@ -1,5 +1,5 @@ // Package staticcheck contains a linter for Go source code. -package staticcheck // import "honnef.co/go/tools/staticcheck" +package staticcheck // import "github.com/golangci/go-tools/staticcheck" import ( "fmt" @@ -16,12 +16,12 @@ import ( "sync" texttemplate "text/template" - "honnef.co/go/tools/deprecated" - "honnef.co/go/tools/functions" - "honnef.co/go/tools/internal/sharedcheck" - "honnef.co/go/tools/lint" - "golang.org/x/tools/go/ssa" - "honnef.co/go/tools/staticcheck/vrp" + "github.com/golangci/go-tools/deprecated" + "github.com/golangci/go-tools/functions" + "github.com/golangci/go-tools/internal/sharedcheck" + "github.com/golangci/go-tools/lint" + "github.com/golangci/tools/go/ssa" + "github.com/golangci/go-tools/staticcheck/vrp" "golang.org/x/tools/go/ast/astutil" ) diff --git a/vendor/honnef.co/go/tools/staticcheck/rules.go b/vendor/github.com/golangci/go-tools/staticcheck/rules.go similarity index 98% rename from vendor/honnef.co/go/tools/staticcheck/rules.go rename to vendor/github.com/golangci/go-tools/staticcheck/rules.go index 13fc6521f791..0767304f13e2 100644 --- a/vendor/honnef.co/go/tools/staticcheck/rules.go +++ b/vendor/github.com/golangci/go-tools/staticcheck/rules.go @@ -13,9 +13,9 @@ import ( "time" "unicode/utf8" - "honnef.co/go/tools/lint" - "golang.org/x/tools/go/ssa" - "honnef.co/go/tools/staticcheck/vrp" + "github.com/golangci/go-tools/lint" + "github.com/golangci/tools/go/ssa" + "github.com/golangci/go-tools/staticcheck/vrp" ) const ( diff --git a/vendor/honnef.co/go/tools/staticcheck/vrp/channel.go b/vendor/github.com/golangci/go-tools/staticcheck/vrp/channel.go similarity index 97% rename from vendor/honnef.co/go/tools/staticcheck/vrp/channel.go rename to vendor/github.com/golangci/go-tools/staticcheck/vrp/channel.go index b6ec2fd80cf0..7d9c9b19e7ae 100644 --- a/vendor/honnef.co/go/tools/staticcheck/vrp/channel.go +++ b/vendor/github.com/golangci/go-tools/staticcheck/vrp/channel.go @@ -3,7 +3,7 @@ package vrp import ( "fmt" - "golang.org/x/tools/go/ssa" + "github.com/golangci/tools/go/ssa" ) type ChannelInterval struct { diff --git a/vendor/honnef.co/go/tools/staticcheck/vrp/int.go b/vendor/github.com/golangci/go-tools/staticcheck/vrp/int.go similarity index 99% rename from vendor/honnef.co/go/tools/staticcheck/vrp/int.go rename to vendor/github.com/golangci/go-tools/staticcheck/vrp/int.go index 669d37d438ed..bf1afaee382d 100644 --- a/vendor/honnef.co/go/tools/staticcheck/vrp/int.go +++ b/vendor/github.com/golangci/go-tools/staticcheck/vrp/int.go @@ -6,7 +6,7 @@ import ( "go/types" "math/big" - "golang.org/x/tools/go/ssa" + "github.com/golangci/tools/go/ssa" ) type Zs []Z diff --git a/vendor/honnef.co/go/tools/staticcheck/vrp/slice.go b/vendor/github.com/golangci/go-tools/staticcheck/vrp/slice.go similarity index 99% rename from vendor/honnef.co/go/tools/staticcheck/vrp/slice.go rename to vendor/github.com/golangci/go-tools/staticcheck/vrp/slice.go index 97827915fb84..fbd451a92cb2 100644 --- a/vendor/honnef.co/go/tools/staticcheck/vrp/slice.go +++ b/vendor/github.com/golangci/go-tools/staticcheck/vrp/slice.go @@ -7,7 +7,7 @@ import ( "fmt" "go/types" - "golang.org/x/tools/go/ssa" + "github.com/golangci/tools/go/ssa" ) type SliceInterval struct { diff --git a/vendor/honnef.co/go/tools/staticcheck/vrp/string.go b/vendor/github.com/golangci/go-tools/staticcheck/vrp/string.go similarity index 99% rename from vendor/honnef.co/go/tools/staticcheck/vrp/string.go rename to vendor/github.com/golangci/go-tools/staticcheck/vrp/string.go index d25ae4ee1258..0b1ac4fba436 100644 --- a/vendor/honnef.co/go/tools/staticcheck/vrp/string.go +++ b/vendor/github.com/golangci/go-tools/staticcheck/vrp/string.go @@ -5,7 +5,7 @@ import ( "go/token" "go/types" - "golang.org/x/tools/go/ssa" + "github.com/golangci/tools/go/ssa" ) type StringInterval struct { diff --git a/vendor/honnef.co/go/tools/staticcheck/vrp/vrp.go b/vendor/github.com/golangci/go-tools/staticcheck/vrp/vrp.go similarity index 99% rename from vendor/honnef.co/go/tools/staticcheck/vrp/vrp.go rename to vendor/github.com/golangci/go-tools/staticcheck/vrp/vrp.go index 6a6320d322b2..021f24e87659 100644 --- a/vendor/honnef.co/go/tools/staticcheck/vrp/vrp.go +++ b/vendor/github.com/golangci/go-tools/staticcheck/vrp/vrp.go @@ -12,7 +12,7 @@ import ( "sort" "strings" - "golang.org/x/tools/go/ssa" + "github.com/golangci/tools/go/ssa" ) type Future interface { diff --git a/vendor/honnef.co/go/tools/unused/unused.go b/vendor/github.com/golangci/go-tools/unused/unused.go similarity index 99% rename from vendor/honnef.co/go/tools/unused/unused.go rename to vendor/github.com/golangci/go-tools/unused/unused.go index 21889e89bb18..d1c87674909e 100644 --- a/vendor/honnef.co/go/tools/unused/unused.go +++ b/vendor/github.com/golangci/go-tools/unused/unused.go @@ -1,4 +1,4 @@ -package unused // import "honnef.co/go/tools/unused" +package unused // import "github.com/golangci/go-tools/unused" import ( "fmt" @@ -9,7 +9,7 @@ import ( "path/filepath" "strings" - "honnef.co/go/tools/lint" + "github.com/golangci/go-tools/lint" "golang.org/x/tools/go/loader" "golang.org/x/tools/go/types/typeutil" diff --git a/vendor/honnef.co/go/tools/version/version.go b/vendor/github.com/golangci/go-tools/version/version.go similarity index 100% rename from vendor/honnef.co/go/tools/version/version.go rename to vendor/github.com/golangci/go-tools/version/version.go diff --git a/vendor/mvdan.cc/interfacer/LICENSE b/vendor/github.com/golangci/interfacer/LICENSE similarity index 100% rename from vendor/mvdan.cc/interfacer/LICENSE rename to vendor/github.com/golangci/interfacer/LICENSE diff --git a/vendor/mvdan.cc/interfacer/check/cache.go b/vendor/github.com/golangci/interfacer/check/cache.go similarity index 100% rename from vendor/mvdan.cc/interfacer/check/cache.go rename to vendor/github.com/golangci/interfacer/check/cache.go diff --git a/vendor/mvdan.cc/interfacer/check/check.go b/vendor/github.com/golangci/interfacer/check/check.go similarity index 98% rename from vendor/mvdan.cc/interfacer/check/check.go rename to vendor/github.com/golangci/interfacer/check/check.go index f4d3b4037b08..623fd57b575d 100644 --- a/vendor/mvdan.cc/interfacer/check/check.go +++ b/vendor/github.com/golangci/interfacer/check/check.go @@ -1,7 +1,7 @@ // Copyright (c) 2015, Daniel Martí // See LICENSE for licensing information -package check // import "mvdan.cc/interfacer/check" +package check // import "github.com/golangci/interfacer/check" import ( "fmt" @@ -12,11 +12,11 @@ import ( "strings" "golang.org/x/tools/go/loader" - "golang.org/x/tools/go/ssa" - "golang.org/x/tools/go/ssa/ssautil" + "github.com/golangci/tools/go/ssa" + "github.com/golangci/tools/go/ssa/ssautil" "github.com/kisielk/gotool" - "mvdan.cc/lint" + "github.com/golangci/lint" ) func toDiscard(usage *varUsage) bool { diff --git a/vendor/mvdan.cc/interfacer/check/types.go b/vendor/github.com/golangci/interfacer/check/types.go similarity index 100% rename from vendor/mvdan.cc/interfacer/check/types.go rename to vendor/github.com/golangci/interfacer/check/types.go diff --git a/vendor/mvdan.cc/lint/.travis.yml b/vendor/github.com/golangci/lint/.travis.yml similarity index 100% rename from vendor/mvdan.cc/lint/.travis.yml rename to vendor/github.com/golangci/lint/.travis.yml diff --git a/vendor/mvdan.cc/lint/LICENSE b/vendor/github.com/golangci/lint/LICENSE similarity index 100% rename from vendor/mvdan.cc/lint/LICENSE rename to vendor/github.com/golangci/lint/LICENSE diff --git a/vendor/mvdan.cc/lint/README.md b/vendor/github.com/golangci/lint/README.md similarity index 100% rename from vendor/mvdan.cc/lint/README.md rename to vendor/github.com/golangci/lint/README.md diff --git a/vendor/mvdan.cc/lint/lint.go b/vendor/github.com/golangci/lint/lint.go similarity index 85% rename from vendor/mvdan.cc/lint/lint.go rename to vendor/github.com/golangci/lint/lint.go index a16789fad568..f0d454368bf9 100644 --- a/vendor/mvdan.cc/lint/lint.go +++ b/vendor/github.com/golangci/lint/lint.go @@ -2,13 +2,13 @@ // See LICENSE for licensing information // Package lint defines common interfaces for Go code checkers. -package lint // import "mvdan.cc/lint" +package lint // import "github.com/golangci/lint" import ( "go/token" "golang.org/x/tools/go/loader" - "golang.org/x/tools/go/ssa" + "github.com/golangci/tools/go/ssa" ) // A Checker points out issues in a program. diff --git a/vendor/github.com/client9/misspell/.gitignore b/vendor/github.com/golangci/misspell/.gitignore similarity index 100% rename from vendor/github.com/client9/misspell/.gitignore rename to vendor/github.com/golangci/misspell/.gitignore diff --git a/vendor/github.com/client9/misspell/.travis.yml b/vendor/github.com/golangci/misspell/.travis.yml similarity index 100% rename from vendor/github.com/client9/misspell/.travis.yml rename to vendor/github.com/golangci/misspell/.travis.yml diff --git a/vendor/github.com/client9/misspell/Dockerfile b/vendor/github.com/golangci/misspell/Dockerfile similarity index 100% rename from vendor/github.com/client9/misspell/Dockerfile rename to vendor/github.com/golangci/misspell/Dockerfile diff --git a/vendor/github.com/client9/misspell/Gopkg.lock b/vendor/github.com/golangci/misspell/Gopkg.lock similarity index 100% rename from vendor/github.com/client9/misspell/Gopkg.lock rename to vendor/github.com/golangci/misspell/Gopkg.lock diff --git a/vendor/github.com/client9/misspell/Gopkg.toml b/vendor/github.com/golangci/misspell/Gopkg.toml similarity index 100% rename from vendor/github.com/client9/misspell/Gopkg.toml rename to vendor/github.com/golangci/misspell/Gopkg.toml diff --git a/vendor/github.com/client9/misspell/LICENSE b/vendor/github.com/golangci/misspell/LICENSE similarity index 100% rename from vendor/github.com/client9/misspell/LICENSE rename to vendor/github.com/golangci/misspell/LICENSE diff --git a/vendor/github.com/client9/misspell/Makefile b/vendor/github.com/golangci/misspell/Makefile similarity index 100% rename from vendor/github.com/client9/misspell/Makefile rename to vendor/github.com/golangci/misspell/Makefile diff --git a/vendor/github.com/client9/misspell/README.md b/vendor/github.com/golangci/misspell/README.md similarity index 100% rename from vendor/github.com/client9/misspell/README.md rename to vendor/github.com/golangci/misspell/README.md diff --git a/vendor/github.com/client9/misspell/RELEASE-HOWTO.md b/vendor/github.com/golangci/misspell/RELEASE-HOWTO.md similarity index 100% rename from vendor/github.com/client9/misspell/RELEASE-HOWTO.md rename to vendor/github.com/golangci/misspell/RELEASE-HOWTO.md diff --git a/vendor/github.com/client9/misspell/ascii.go b/vendor/github.com/golangci/misspell/ascii.go similarity index 100% rename from vendor/github.com/client9/misspell/ascii.go rename to vendor/github.com/golangci/misspell/ascii.go diff --git a/vendor/github.com/client9/misspell/case.go b/vendor/github.com/golangci/misspell/case.go similarity index 100% rename from vendor/github.com/client9/misspell/case.go rename to vendor/github.com/golangci/misspell/case.go diff --git a/vendor/github.com/client9/misspell/goreleaser.yml b/vendor/github.com/golangci/misspell/goreleaser.yml similarity index 100% rename from vendor/github.com/client9/misspell/goreleaser.yml rename to vendor/github.com/golangci/misspell/goreleaser.yml diff --git a/vendor/github.com/client9/misspell/install-misspell.sh b/vendor/github.com/golangci/misspell/install-misspell.sh similarity index 100% rename from vendor/github.com/client9/misspell/install-misspell.sh rename to vendor/github.com/golangci/misspell/install-misspell.sh diff --git a/vendor/github.com/client9/misspell/legal.go b/vendor/github.com/golangci/misspell/legal.go similarity index 100% rename from vendor/github.com/client9/misspell/legal.go rename to vendor/github.com/golangci/misspell/legal.go diff --git a/vendor/github.com/client9/misspell/mime.go b/vendor/github.com/golangci/misspell/mime.go similarity index 100% rename from vendor/github.com/client9/misspell/mime.go rename to vendor/github.com/golangci/misspell/mime.go diff --git a/vendor/github.com/client9/misspell/notwords.go b/vendor/github.com/golangci/misspell/notwords.go similarity index 100% rename from vendor/github.com/client9/misspell/notwords.go rename to vendor/github.com/golangci/misspell/notwords.go diff --git a/vendor/github.com/client9/misspell/replace.go b/vendor/github.com/golangci/misspell/replace.go similarity index 100% rename from vendor/github.com/client9/misspell/replace.go rename to vendor/github.com/golangci/misspell/replace.go diff --git a/vendor/github.com/client9/misspell/stringreplacer.go b/vendor/github.com/golangci/misspell/stringreplacer.go similarity index 100% rename from vendor/github.com/client9/misspell/stringreplacer.go rename to vendor/github.com/golangci/misspell/stringreplacer.go diff --git a/vendor/github.com/client9/misspell/stringreplacer_test.gox b/vendor/github.com/golangci/misspell/stringreplacer_test.gox similarity index 100% rename from vendor/github.com/client9/misspell/stringreplacer_test.gox rename to vendor/github.com/golangci/misspell/stringreplacer_test.gox diff --git a/vendor/github.com/client9/misspell/url.go b/vendor/github.com/golangci/misspell/url.go similarity index 100% rename from vendor/github.com/client9/misspell/url.go rename to vendor/github.com/golangci/misspell/url.go diff --git a/vendor/github.com/client9/misspell/words.go b/vendor/github.com/golangci/misspell/words.go similarity index 100% rename from vendor/github.com/client9/misspell/words.go rename to vendor/github.com/golangci/misspell/words.go diff --git a/vendor/github.com/golangci/tools/AUTHORS b/vendor/github.com/golangci/tools/AUTHORS new file mode 100644 index 000000000000..15167cd746c5 --- /dev/null +++ b/vendor/github.com/golangci/tools/AUTHORS @@ -0,0 +1,3 @@ +# This source code refers to The Go Authors for copyright purposes. +# The master list of authors is in the main Go distribution, +# visible at http://tip.golang.org/AUTHORS. diff --git a/vendor/github.com/golangci/tools/CONTRIBUTORS b/vendor/github.com/golangci/tools/CONTRIBUTORS new file mode 100644 index 000000000000..1c4577e96806 --- /dev/null +++ b/vendor/github.com/golangci/tools/CONTRIBUTORS @@ -0,0 +1,3 @@ +# This source code was written by the Go contributors. +# The master list of contributors is in the main Go distribution, +# visible at http://tip.golang.org/CONTRIBUTORS. diff --git a/vendor/github.com/golangci/tools/LICENSE b/vendor/github.com/golangci/tools/LICENSE new file mode 100644 index 000000000000..6a66aea5eafe --- /dev/null +++ b/vendor/github.com/golangci/tools/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/golangci/tools/PATENTS b/vendor/github.com/golangci/tools/PATENTS new file mode 100644 index 000000000000..733099041f84 --- /dev/null +++ b/vendor/github.com/golangci/tools/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/vendor/github.com/golangci/tools/cmd/getgo/LICENSE b/vendor/github.com/golangci/tools/cmd/getgo/LICENSE new file mode 100644 index 000000000000..32017f8fa1d8 --- /dev/null +++ b/vendor/github.com/golangci/tools/cmd/getgo/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2017 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/golang.org/x/tools/go/callgraph/callgraph.go b/vendor/github.com/golangci/tools/go/callgraph/callgraph.go similarity index 97% rename from vendor/golang.org/x/tools/go/callgraph/callgraph.go rename to vendor/github.com/golangci/tools/go/callgraph/callgraph.go index 707a31931a70..0a1272b435c0 100644 --- a/vendor/golang.org/x/tools/go/callgraph/callgraph.go +++ b/vendor/github.com/golangci/tools/go/callgraph/callgraph.go @@ -32,7 +32,7 @@ in the call graph; they are treated like built-in operators of the language. */ -package callgraph // import "golang.org/x/tools/go/callgraph" +package callgraph // import "github.com/golangci/tools/go/callgraph" // TODO(adonovan): add a function to eliminate wrappers from the // callgraph, preserving topology. @@ -43,7 +43,7 @@ import ( "fmt" "go/token" - "golang.org/x/tools/go/ssa" + "github.com/golangci/tools/go/ssa" ) // A Graph represents a call graph. diff --git a/vendor/golang.org/x/tools/go/callgraph/cha/cha.go b/vendor/github.com/golangci/tools/go/callgraph/cha/cha.go similarity index 95% rename from vendor/golang.org/x/tools/go/callgraph/cha/cha.go rename to vendor/github.com/golangci/tools/go/callgraph/cha/cha.go index 68ffffebd772..4940fe63a575 100644 --- a/vendor/golang.org/x/tools/go/callgraph/cha/cha.go +++ b/vendor/github.com/golangci/tools/go/callgraph/cha/cha.go @@ -21,14 +21,14 @@ // and all concrete types are put into interfaces, it is sound to run on // partial programs, such as libraries without a main or test function. // -package cha // import "golang.org/x/tools/go/callgraph/cha" +package cha // import "github.com/golangci/tools/go/callgraph/cha" import ( "go/types" - "golang.org/x/tools/go/callgraph" - "golang.org/x/tools/go/ssa" - "golang.org/x/tools/go/ssa/ssautil" + "github.com/golangci/tools/go/callgraph" + "github.com/golangci/tools/go/ssa" + "github.com/golangci/tools/go/ssa/ssautil" "golang.org/x/tools/go/types/typeutil" ) diff --git a/vendor/golang.org/x/tools/go/callgraph/rta/rta.go b/vendor/github.com/golangci/tools/go/callgraph/rta/rta.go similarity index 99% rename from vendor/golang.org/x/tools/go/callgraph/rta/rta.go rename to vendor/github.com/golangci/tools/go/callgraph/rta/rta.go index 1a2dadf573ab..c24e189b3653 100644 --- a/vendor/golang.org/x/tools/go/callgraph/rta/rta.go +++ b/vendor/github.com/golangci/tools/go/callgraph/rta/rta.go @@ -40,7 +40,7 @@ // cmd/callgraph tool on its own source takes ~2.1s for RTA and ~5.4s // for points-to analysis. // -package rta // import "golang.org/x/tools/go/callgraph/rta" +package rta // import "github.com/golangci/tools/go/callgraph/rta" // TODO(adonovan): test it by connecting it to the interpreter and // replacing all "unreachable" functions by a special intrinsic, and @@ -50,8 +50,8 @@ import ( "fmt" "go/types" - "golang.org/x/tools/go/callgraph" - "golang.org/x/tools/go/ssa" + "github.com/golangci/tools/go/callgraph" + "github.com/golangci/tools/go/ssa" "golang.org/x/tools/go/types/typeutil" ) diff --git a/vendor/golang.org/x/tools/go/callgraph/static/static.go b/vendor/github.com/golangci/tools/go/callgraph/static/static.go similarity index 82% rename from vendor/golang.org/x/tools/go/callgraph/static/static.go rename to vendor/github.com/golangci/tools/go/callgraph/static/static.go index 709bb7b6bd84..ac264242d147 100644 --- a/vendor/golang.org/x/tools/go/callgraph/static/static.go +++ b/vendor/github.com/golangci/tools/go/callgraph/static/static.go @@ -1,11 +1,11 @@ // Package static computes the call graph of a Go program containing // only static call edges. -package static // import "golang.org/x/tools/go/callgraph/static" +package static // import "github.com/golangci/tools/go/callgraph/static" import ( - "golang.org/x/tools/go/callgraph" - "golang.org/x/tools/go/ssa" - "golang.org/x/tools/go/ssa/ssautil" + "github.com/golangci/tools/go/callgraph" + "github.com/golangci/tools/go/ssa" + "github.com/golangci/tools/go/ssa/ssautil" ) // CallGraph computes the call graph of the specified program diff --git a/vendor/golang.org/x/tools/go/callgraph/util.go b/vendor/github.com/golangci/tools/go/callgraph/util.go similarity index 99% rename from vendor/golang.org/x/tools/go/callgraph/util.go rename to vendor/github.com/golangci/tools/go/callgraph/util.go index a8f89031c058..7d84efd1972e 100644 --- a/vendor/golang.org/x/tools/go/callgraph/util.go +++ b/vendor/github.com/golangci/tools/go/callgraph/util.go @@ -4,7 +4,7 @@ package callgraph -import "golang.org/x/tools/go/ssa" +import "github.com/golangci/tools/go/ssa" // This file provides various utilities over call graphs, such as // visitation and path search. diff --git a/vendor/golang.org/x/tools/go/ssa/LICENSE b/vendor/github.com/golangci/tools/go/ssa/LICENSE similarity index 100% rename from vendor/golang.org/x/tools/go/ssa/LICENSE rename to vendor/github.com/golangci/tools/go/ssa/LICENSE diff --git a/vendor/golang.org/x/tools/go/ssa/blockopt.go b/vendor/github.com/golangci/tools/go/ssa/blockopt.go similarity index 100% rename from vendor/golang.org/x/tools/go/ssa/blockopt.go rename to vendor/github.com/golangci/tools/go/ssa/blockopt.go diff --git a/vendor/golang.org/x/tools/go/ssa/builder.go b/vendor/github.com/golangci/tools/go/ssa/builder.go similarity index 100% rename from vendor/golang.org/x/tools/go/ssa/builder.go rename to vendor/github.com/golangci/tools/go/ssa/builder.go diff --git a/vendor/golang.org/x/tools/go/ssa/const.go b/vendor/github.com/golangci/tools/go/ssa/const.go similarity index 98% rename from vendor/golang.org/x/tools/go/ssa/const.go rename to vendor/github.com/golangci/tools/go/ssa/const.go index 0690463df28e..8b6dbabf581c 100644 --- a/vendor/golang.org/x/tools/go/ssa/const.go +++ b/vendor/github.com/golangci/tools/go/ssa/const.go @@ -117,7 +117,7 @@ func (c *Const) IsNil() bool { return c.Value == nil } -// TODO(adonovan): move everything below into golang.org/x/tools/go/ssa/interp. +// TODO(adonovan): move everything below into github.com/golangci/tools/go/ssa/interp. // Int64 returns the numeric value of this constant truncated to fit // a signed 64-bit integer. diff --git a/vendor/golang.org/x/tools/go/ssa/const15.go b/vendor/github.com/golangci/tools/go/ssa/const15.go similarity index 97% rename from vendor/golang.org/x/tools/go/ssa/const15.go rename to vendor/github.com/golangci/tools/go/ssa/const15.go index a42b255a67d6..795cadaa08c5 100644 --- a/vendor/golang.org/x/tools/go/ssa/const15.go +++ b/vendor/github.com/golangci/tools/go/ssa/const15.go @@ -117,7 +117,7 @@ func (c *Const) IsNil() bool { return c.Value == nil } -// TODO(adonovan): move everything below into golang.org/x/tools/go/ssa/interp. +// TODO(adonovan): move everything below into github.com/golangci/tools/go/ssa/interp. // Int64 returns the numeric value of this constant truncated to fit // a signed 64-bit integer. diff --git a/vendor/golang.org/x/tools/go/ssa/create.go b/vendor/github.com/golangci/tools/go/ssa/create.go similarity index 100% rename from vendor/golang.org/x/tools/go/ssa/create.go rename to vendor/github.com/golangci/tools/go/ssa/create.go diff --git a/vendor/golang.org/x/tools/go/ssa/doc.go b/vendor/github.com/golangci/tools/go/ssa/doc.go similarity index 99% rename from vendor/golang.org/x/tools/go/ssa/doc.go rename to vendor/github.com/golangci/tools/go/ssa/doc.go index 2aa04f436583..5297b9cd0bb2 100644 --- a/vendor/golang.org/x/tools/go/ssa/doc.go +++ b/vendor/github.com/golangci/tools/go/ssa/doc.go @@ -120,4 +120,4 @@ // domains of source locations, ast.Nodes, types.Objects, // ssa.Values/Instructions. // -package ssa // import "golang.org/x/tools/go/ssa" +package ssa // import "github.com/golangci/tools/go/ssa" diff --git a/vendor/golang.org/x/tools/go/ssa/dom.go b/vendor/github.com/golangci/tools/go/ssa/dom.go similarity index 100% rename from vendor/golang.org/x/tools/go/ssa/dom.go rename to vendor/github.com/golangci/tools/go/ssa/dom.go diff --git a/vendor/golang.org/x/tools/go/ssa/emit.go b/vendor/github.com/golangci/tools/go/ssa/emit.go similarity index 100% rename from vendor/golang.org/x/tools/go/ssa/emit.go rename to vendor/github.com/golangci/tools/go/ssa/emit.go diff --git a/vendor/golang.org/x/tools/go/ssa/func.go b/vendor/github.com/golangci/tools/go/ssa/func.go similarity index 100% rename from vendor/golang.org/x/tools/go/ssa/func.go rename to vendor/github.com/golangci/tools/go/ssa/func.go diff --git a/vendor/golang.org/x/tools/go/ssa/identical.go b/vendor/github.com/golangci/tools/go/ssa/identical.go similarity index 100% rename from vendor/golang.org/x/tools/go/ssa/identical.go rename to vendor/github.com/golangci/tools/go/ssa/identical.go diff --git a/vendor/golang.org/x/tools/go/ssa/identical_17.go b/vendor/github.com/golangci/tools/go/ssa/identical_17.go similarity index 100% rename from vendor/golang.org/x/tools/go/ssa/identical_17.go rename to vendor/github.com/golangci/tools/go/ssa/identical_17.go diff --git a/vendor/golang.org/x/tools/go/ssa/lift.go b/vendor/github.com/golangci/tools/go/ssa/lift.go similarity index 100% rename from vendor/golang.org/x/tools/go/ssa/lift.go rename to vendor/github.com/golangci/tools/go/ssa/lift.go diff --git a/vendor/golang.org/x/tools/go/ssa/lvalue.go b/vendor/github.com/golangci/tools/go/ssa/lvalue.go similarity index 100% rename from vendor/golang.org/x/tools/go/ssa/lvalue.go rename to vendor/github.com/golangci/tools/go/ssa/lvalue.go diff --git a/vendor/golang.org/x/tools/go/ssa/methods.go b/vendor/github.com/golangci/tools/go/ssa/methods.go similarity index 100% rename from vendor/golang.org/x/tools/go/ssa/methods.go rename to vendor/github.com/golangci/tools/go/ssa/methods.go diff --git a/vendor/golang.org/x/tools/go/ssa/mode.go b/vendor/github.com/golangci/tools/go/ssa/mode.go similarity index 100% rename from vendor/golang.org/x/tools/go/ssa/mode.go rename to vendor/github.com/golangci/tools/go/ssa/mode.go diff --git a/vendor/golang.org/x/tools/go/ssa/print.go b/vendor/github.com/golangci/tools/go/ssa/print.go similarity index 100% rename from vendor/golang.org/x/tools/go/ssa/print.go rename to vendor/github.com/golangci/tools/go/ssa/print.go diff --git a/vendor/golang.org/x/tools/go/ssa/sanity.go b/vendor/github.com/golangci/tools/go/ssa/sanity.go similarity index 100% rename from vendor/golang.org/x/tools/go/ssa/sanity.go rename to vendor/github.com/golangci/tools/go/ssa/sanity.go diff --git a/vendor/golang.org/x/tools/go/ssa/source.go b/vendor/github.com/golangci/tools/go/ssa/source.go similarity index 100% rename from vendor/golang.org/x/tools/go/ssa/source.go rename to vendor/github.com/golangci/tools/go/ssa/source.go diff --git a/vendor/golang.org/x/tools/go/ssa/ssa.go b/vendor/github.com/golangci/tools/go/ssa/ssa.go similarity index 100% rename from vendor/golang.org/x/tools/go/ssa/ssa.go rename to vendor/github.com/golangci/tools/go/ssa/ssa.go diff --git a/vendor/golang.org/x/tools/go/ssa/ssautil/load.go b/vendor/github.com/golangci/tools/go/ssa/ssautil/load.go similarity index 98% rename from vendor/golang.org/x/tools/go/ssa/ssautil/load.go rename to vendor/github.com/golangci/tools/go/ssa/ssautil/load.go index 5eb57a1a0452..6e5a4675e53f 100644 --- a/vendor/golang.org/x/tools/go/ssa/ssautil/load.go +++ b/vendor/github.com/golangci/tools/go/ssa/ssautil/load.go @@ -14,7 +14,7 @@ import ( "go/types" "golang.org/x/tools/go/loader" - "golang.org/x/tools/go/ssa" + "github.com/golangci/tools/go/ssa" ) // CreateProgram returns a new program in SSA form, given a program diff --git a/vendor/golang.org/x/tools/go/ssa/ssautil/switch.go b/vendor/github.com/golangci/tools/go/ssa/ssautil/switch.go similarity index 99% rename from vendor/golang.org/x/tools/go/ssa/ssautil/switch.go rename to vendor/github.com/golangci/tools/go/ssa/ssautil/switch.go index 2fcc1672d4f1..ede3a75744bc 100644 --- a/vendor/golang.org/x/tools/go/ssa/ssautil/switch.go +++ b/vendor/github.com/golangci/tools/go/ssa/ssautil/switch.go @@ -26,7 +26,7 @@ import ( "go/token" "go/types" - "golang.org/x/tools/go/ssa" + "github.com/golangci/tools/go/ssa" ) // A ConstCase represents a single constant comparison. diff --git a/vendor/golang.org/x/tools/go/ssa/ssautil/visit.go b/vendor/github.com/golangci/tools/go/ssa/ssautil/visit.go similarity index 94% rename from vendor/golang.org/x/tools/go/ssa/ssautil/visit.go rename to vendor/github.com/golangci/tools/go/ssa/ssautil/visit.go index 3424e8a30868..6dee49217374 100644 --- a/vendor/golang.org/x/tools/go/ssa/ssautil/visit.go +++ b/vendor/github.com/golangci/tools/go/ssa/ssautil/visit.go @@ -2,9 +2,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package ssautil // import "golang.org/x/tools/go/ssa/ssautil" +package ssautil // import "github.com/golangci/tools/go/ssa/ssautil" -import "golang.org/x/tools/go/ssa" +import "github.com/golangci/tools/go/ssa" // This file defines utilities for visiting the SSA representation of // a Program. diff --git a/vendor/golang.org/x/tools/go/ssa/testmain.go b/vendor/github.com/golangci/tools/go/ssa/testmain.go similarity index 100% rename from vendor/golang.org/x/tools/go/ssa/testmain.go rename to vendor/github.com/golangci/tools/go/ssa/testmain.go diff --git a/vendor/golang.org/x/tools/go/ssa/util.go b/vendor/github.com/golangci/tools/go/ssa/util.go similarity index 100% rename from vendor/golang.org/x/tools/go/ssa/util.go rename to vendor/github.com/golangci/tools/go/ssa/util.go diff --git a/vendor/golang.org/x/tools/go/ssa/wrappers.go b/vendor/github.com/golangci/tools/go/ssa/wrappers.go similarity index 100% rename from vendor/golang.org/x/tools/go/ssa/wrappers.go rename to vendor/github.com/golangci/tools/go/ssa/wrappers.go diff --git a/vendor/golang.org/x/tools/go/ssa/write.go b/vendor/github.com/golangci/tools/go/ssa/write.go similarity index 100% rename from vendor/golang.org/x/tools/go/ssa/write.go rename to vendor/github.com/golangci/tools/go/ssa/write.go diff --git a/vendor/github.com/golangci/tools/third_party/moduleloader/LICENSE b/vendor/github.com/golangci/tools/third_party/moduleloader/LICENSE new file mode 100644 index 000000000000..1723a2247b53 --- /dev/null +++ b/vendor/github.com/golangci/tools/third_party/moduleloader/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2013-2016 Guy Bedford, Luke Hoban, Addy Osmani + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/vendor/github.com/golangci/tools/third_party/typescript/LICENSE b/vendor/github.com/golangci/tools/third_party/typescript/LICENSE new file mode 100644 index 000000000000..e7259f843814 --- /dev/null +++ b/vendor/github.com/golangci/tools/third_party/typescript/LICENSE @@ -0,0 +1,55 @@ +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and + +You must cause any modified files to carry prominent notices stating that You changed the files; and + +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/vendor/github.com/golangci/tools/third_party/webcomponents/LICENSE b/vendor/github.com/golangci/tools/third_party/webcomponents/LICENSE new file mode 100644 index 000000000000..e648283b42f7 --- /dev/null +++ b/vendor/github.com/golangci/tools/third_party/webcomponents/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2015 The Polymer Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/vendor/mvdan.cc/unparam/LICENSE b/vendor/github.com/golangci/unparam/LICENSE similarity index 100% rename from vendor/mvdan.cc/unparam/LICENSE rename to vendor/github.com/golangci/unparam/LICENSE diff --git a/vendor/mvdan.cc/unparam/check/check.go b/vendor/github.com/golangci/unparam/check/check.go similarity index 89% rename from vendor/mvdan.cc/unparam/check/check.go rename to vendor/github.com/golangci/unparam/check/check.go index ce9297dc2f2b..2d144c4f1dfd 100644 --- a/vendor/mvdan.cc/unparam/check/check.go +++ b/vendor/github.com/golangci/unparam/check/check.go @@ -3,7 +3,7 @@ // Package check implements the unparam linter. Note that its API is not // stable. -package check // import "mvdan.cc/unparam/check" +package check import ( "bytes" @@ -21,15 +21,15 @@ import ( "sort" "strings" - "golang.org/x/tools/go/callgraph" - "golang.org/x/tools/go/callgraph/cha" - "golang.org/x/tools/go/callgraph/rta" + "github.com/golangci/tools/go/callgraph" + "github.com/golangci/tools/go/callgraph/cha" + "github.com/golangci/tools/go/callgraph/rta" "golang.org/x/tools/go/loader" - "golang.org/x/tools/go/ssa" - "golang.org/x/tools/go/ssa/ssautil" + "github.com/golangci/tools/go/ssa" + "github.com/golangci/tools/go/ssa/ssautil" "github.com/kisielk/gotool" - "mvdan.cc/lint" + "github.com/golangci/lint" ) // UnusedParams returns a list of human-readable issues that point out unused @@ -77,8 +77,7 @@ var ( _ lint.Checker = (*Checker)(nil) _ lint.WithSSA = (*Checker)(nil) - errorType = types.Universe.Lookup("error").Type() - unknownConst = constant.MakeUnknown() + errorType = types.Universe.Lookup("error").Type() ) // lines runs the checker and returns the list of readable issues. @@ -157,11 +156,17 @@ func generatedDoc(text string) bool { } // eqlConsts reports whether two constant values, possibly nil, are equal. -func eqlConsts(v1, v2 constant.Value) bool { - if v1 == nil || v2 == nil { - return v1 == v2 +func eqlConsts(c1, c2 *ssa.Const) bool { + if c1 == nil || c2 == nil { + return c1 == c2 } - return constant.Compare(v1, token.EQL, v2) + if c1.Type() != c2.Type() { + return false + } + if c1.Value == nil || c2.Value == nil { + return c1.Value == c2.Value + } + return constant.Compare(c1.Value, token.EQL, c2.Value) } var stdSizes = types.SizesFor("gc", "amd64") @@ -255,14 +260,12 @@ func (c *Checker) addIssue(fn *ssa.Function, pos token.Pos, format string, args }) } -// constantValueToString returns string representation for constant value -func constantValueToString(val constant.Value) string { - valStr := "nil" // an untyped nil is a nil constant.Value - if val != nil { - valStr = val.String() +// constValueString is cnst.Value.String() without panicking on untyped nils. +func constValueString(cnst *ssa.Const) string { + if cnst.Value == nil { + return "nil" } - - return valStr + return cnst.Value.String() } // checkFunc checks a single function for unused parameters. @@ -286,7 +289,7 @@ func (c *Checker) checkFunc(fn *ssa.Function, pkgInfo *loader.PackageInfo) { } results := fn.Signature.Results() - sameConsts := make([]constant.Value, results.Len()) + sameConsts := make([]*ssa.Const, results.Len()) numRets := 0 allRetsExtracting := true for _, block := range fn.Blocks { @@ -299,34 +302,31 @@ func (c *Checker) checkFunc(fn *ssa.Function, pkgInfo *loader.PackageInfo) { if _, ok := val.(*ssa.Extract); !ok { allRetsExtracting = false } - value := unknownConst - if x, ok := val.(*ssa.Const); ok { - value = x.Value - } + cnst := constValue(val) if numRets == 0 { - sameConsts[i] = value - } else if !eqlConsts(sameConsts[i], value) { - sameConsts[i] = unknownConst + sameConsts[i] = cnst + } else if !eqlConsts(sameConsts[i], cnst) { + sameConsts[i] = nil } } numRets++ } - for i, val := range sameConsts { - if val == unknownConst { + for i, cnst := range sameConsts { + if cnst == nil { // no consistent returned constant continue } - if val != nil && numRets == 1 { - // just one non-nil return (too many false positives) + if cnst.Value != nil && numRets == 1 { + // just one return and it's not untyped nil (too many + // false positives) continue } - valStr := constantValueToString(val) if calledInReturn(inboundCalls) { continue } res := results.At(i) name := paramDesc(i, res) - c.addIssue(fn, res.Pos(), "result %s is always %s", name, valStr) + c.addIssue(fn, res.Pos(), "result %s is always %s", name, constValueString(cnst)) } resLoop: @@ -474,7 +474,7 @@ func (c *Checker) alwaysReceivedConst(in []*callgraph.Edge, par *ssa.Parameter, // we might not have all call sites for an exported func return "" } - seen := unknownConst + var seen *ssa.Const origPos := pos if par.Parent().Signature.Recv() != nil { // go/ast's CallExpr.Args does not include the receiver, but @@ -484,8 +484,8 @@ func (c *Checker) alwaysReceivedConst(in []*callgraph.Edge, par *ssa.Parameter, seenOrig := "" for _, edge := range in { call := edge.Site.Common() - cnst, ok := call.Args[pos].(*ssa.Const) - if !ok { + cnst := constValue(call.Args[pos]) + if cnst == nil { return "" // not a constant } origArg := "" @@ -495,22 +495,32 @@ func (c *Checker) alwaysReceivedConst(in []*callgraph.Edge, par *ssa.Parameter, } else { origArg = nodeStr(origCall.Args[origPos]) } - if seen == unknownConst { - seen = cnst.Value // first constant + if seen == nil { + seen = cnst // first constant seenOrig = origArg - } else if !eqlConsts(seen, cnst.Value) { + } else if !eqlConsts(seen, cnst) { return "" // different constants } else if origArg != seenOrig { seenOrig = "" } } - seenStr := constantValueToString(seen) - if seenOrig != "" && seenOrig != seenStr { - return fmt.Sprintf("%s (%v)", seenOrig, seen) + seenStr := constValueString(seen) + if seenOrig != "" && seenStr != seenOrig { + return fmt.Sprintf("%s (%s)", seenOrig, seenStr) } return seenStr } +func constValue(value ssa.Value) *ssa.Const { + switch x := value.(type) { + case *ssa.Const: + return x + case *ssa.MakeInterface: + return constValue(x.X) + } + return nil +} + // anyRealUse reports whether a parameter has any relevant use within its // function body. Certain uses are ignored, such as recursive calls where the // parameter is re-used as itself. @@ -741,10 +751,29 @@ func requiredViaCall(fn *ssa.Function, calls []*callgraph.Edge) bool { // called via fn(x()) return true } - if _, ok := edge.Site.Common().Value.(*ssa.Function); !ok { - // called via a parameter or field, type is set in - // stone. + switch edge.Site.Common().Value.(type) { + case *ssa.Parameter: + // Func used as parameter; not safe. + return true + case *ssa.Call: + // Called through an interface; not safe. + return true + case *ssa.TypeAssert: + // Called through a type assertion; not safe. return true + case *ssa.Const: + // Conservative "may implement" edge; not safe. + return true + case *ssa.UnOp: + // TODO: why is this not safe? + return true + case *ssa.Phi: + // We may run this function or another; not safe. + return true + case *ssa.Function: + // Called directly; the call site can easily be adapted. + default: + // Other instructions are safe or non-interesting. } } return false diff --git a/vendor/golang.org/x/tools/go/loader/cgo.go b/vendor/golang.org/x/tools/go/internal/cgo/cgo.go similarity index 85% rename from vendor/golang.org/x/tools/go/loader/cgo.go rename to vendor/golang.org/x/tools/go/internal/cgo/cgo.go index 72c6f502d193..0f652ea6fb59 100644 --- a/vendor/golang.org/x/tools/go/loader/cgo.go +++ b/vendor/golang.org/x/tools/go/internal/cgo/cgo.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package loader +package cgo // This file handles cgo preprocessing of files containing `import "C"`. // @@ -66,10 +66,10 @@ import ( "strings" ) -// processCgoFiles invokes the cgo preprocessor on bp.CgoFiles, parses +// ProcessFiles invokes the cgo preprocessor on bp.CgoFiles, parses // the output and returns the resulting ASTs. // -func processCgoFiles(bp *build.Package, fset *token.FileSet, DisplayPath func(path string) string, mode parser.Mode) ([]*ast.File, error) { +func ProcessFiles(bp *build.Package, fset *token.FileSet, DisplayPath func(path string) string, mode parser.Mode) ([]*ast.File, error) { tmpdir, err := ioutil.TempDir("", strings.Replace(bp.ImportPath, "/", "_", -1)+"_C") if err != nil { return nil, err @@ -81,7 +81,7 @@ func processCgoFiles(bp *build.Package, fset *token.FileSet, DisplayPath func(pa pkgdir = DisplayPath(pkgdir) } - cgoFiles, cgoDisplayFiles, err := runCgo(bp, pkgdir, tmpdir) + cgoFiles, cgoDisplayFiles, err := Run(bp, pkgdir, tmpdir, false) if err != nil { return nil, err } @@ -104,15 +104,20 @@ func processCgoFiles(bp *build.Package, fset *token.FileSet, DisplayPath func(pa var cgoRe = regexp.MustCompile(`[/\\:]`) -// runCgo invokes the cgo preprocessor on bp.CgoFiles and returns two +// Run invokes the cgo preprocessor on bp.CgoFiles and returns two // lists of files: the resulting processed files (in temporary // directory tmpdir) and the corresponding names of the unprocessed files. // -// runCgo is adapted from (*builder).cgo in +// Run is adapted from (*builder).cgo in // $GOROOT/src/cmd/go/build.go, but these features are unsupported: // Objective C, CGOPKGPATH, CGO_FLAGS. // -func runCgo(bp *build.Package, pkgdir, tmpdir string) (files, displayFiles []string, err error) { +// If useabs is set to true, absolute paths of the bp.CgoFiles will be passed in +// to the cgo preprocessor. This in turn will set the // line comments +// referring to those files to use absolute paths. This is needed for +// go/packages using the legacy go list support so it is able to find +// the original files. +func Run(bp *build.Package, pkgdir, tmpdir string, useabs bool) (files, displayFiles []string, err error) { cgoCPPFLAGS, _, _, _ := cflags(bp, true) _, cgoexeCFLAGS, _, _ := cflags(bp, false) @@ -145,9 +150,17 @@ func runCgo(bp *build.Package, pkgdir, tmpdir string) (files, displayFiles []str cgoflags = append(cgoflags, "-import_syscall=false") } + var cgoFiles []string = bp.CgoFiles + if useabs { + cgoFiles = make([]string, len(bp.CgoFiles)) + for i := range cgoFiles { + cgoFiles[i] = filepath.Join(pkgdir, bp.CgoFiles[i]) + } + } + args := stringList( "go", "tool", "cgo", "-objdir", tmpdir, cgoflags, "--", - cgoCPPFLAGS, cgoexeCFLAGS, bp.CgoFiles, + cgoCPPFLAGS, cgoexeCFLAGS, cgoFiles, ) if false { log.Printf("Running cgo for package %q: %s (dir=%s)", bp.ImportPath, args, pkgdir) diff --git a/vendor/golang.org/x/tools/go/loader/cgo_pkgconfig.go b/vendor/golang.org/x/tools/go/internal/cgo/cgo_pkgconfig.go similarity index 98% rename from vendor/golang.org/x/tools/go/loader/cgo_pkgconfig.go rename to vendor/golang.org/x/tools/go/internal/cgo/cgo_pkgconfig.go index de57422df228..b5bb95a63e50 100644 --- a/vendor/golang.org/x/tools/go/loader/cgo_pkgconfig.go +++ b/vendor/golang.org/x/tools/go/internal/cgo/cgo_pkgconfig.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package loader +package cgo import ( "errors" diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go b/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go index 12408e0a3bc3..47dd46136296 100644 --- a/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go +++ b/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go @@ -16,7 +16,7 @@ import ( "errors" "fmt" "go/build" - exact "go/constant" + "go/constant" "go/token" "go/types" "io" @@ -777,9 +777,9 @@ func (p *parser) parseInt() string { // number = int_lit [ "p" int_lit ] . // -func (p *parser) parseNumber() (typ *types.Basic, val exact.Value) { +func (p *parser) parseNumber() (typ *types.Basic, val constant.Value) { // mantissa - mant := exact.MakeFromLiteral(p.parseInt(), token.INT, 0) + mant := constant.MakeFromLiteral(p.parseInt(), token.INT, 0) if mant == nil { panic("invalid mantissa") } @@ -792,14 +792,14 @@ func (p *parser) parseNumber() (typ *types.Basic, val exact.Value) { p.error(err) } if exp < 0 { - denom := exact.MakeInt64(1) - denom = exact.Shift(denom, token.SHL, uint(-exp)) + denom := constant.MakeInt64(1) + denom = constant.Shift(denom, token.SHL, uint(-exp)) typ = types.Typ[types.UntypedFloat] - val = exact.BinaryOp(mant, token.QUO, denom) + val = constant.BinaryOp(mant, token.QUO, denom) return } if exp > 0 { - mant = exact.Shift(mant, token.SHL, uint(exp)) + mant = constant.Shift(mant, token.SHL, uint(exp)) } typ = types.Typ[types.UntypedFloat] val = mant @@ -830,7 +830,7 @@ func (p *parser) parseConstDecl() { p.expect('=') var typ types.Type - var val exact.Value + var val constant.Value switch p.tok { case scanner.Ident: // bool_lit @@ -838,7 +838,7 @@ func (p *parser) parseConstDecl() { p.error("expected true or false") } typ = types.Typ[types.UntypedBool] - val = exact.MakeBool(p.lit == "true") + val = constant.MakeBool(p.lit == "true") p.next() case '-', scanner.Int: @@ -862,18 +862,18 @@ func (p *parser) parseConstDecl() { p.expectKeyword("i") p.expect(')') typ = types.Typ[types.UntypedComplex] - val = exact.BinaryOp(re, token.ADD, exact.MakeImag(im)) + val = constant.BinaryOp(re, token.ADD, constant.MakeImag(im)) case scanner.Char: // rune_lit typ = types.Typ[types.UntypedRune] - val = exact.MakeFromLiteral(p.lit, token.CHAR, 0) + val = constant.MakeFromLiteral(p.lit, token.CHAR, 0) p.next() case scanner.String: // string_lit typ = types.Typ[types.UntypedString] - val = exact.MakeFromLiteral(p.lit, token.STRING, 0) + val = constant.MakeFromLiteral(p.lit, token.STRING, 0) p.next() default: diff --git a/vendor/golang.org/x/tools/go/loader/loader.go b/vendor/golang.org/x/tools/go/loader/loader.go index de756f7fcf1c..c45666118953 100644 --- a/vendor/golang.org/x/tools/go/loader/loader.go +++ b/vendor/golang.org/x/tools/go/loader/loader.go @@ -22,6 +22,7 @@ import ( "time" "golang.org/x/tools/go/ast/astutil" + "golang.org/x/tools/go/internal/cgo" ) var ignoreVendor build.ImportMode @@ -754,7 +755,7 @@ func (conf *Config) parsePackageFiles(bp *build.Package, which rune) ([]*ast.Fil // Preprocess CgoFiles and parse the outputs (sequentially). if which == 'g' && bp.CgoFiles != nil { - cgofiles, err := processCgoFiles(bp, conf.fset(), conf.DisplayPath, conf.ParserMode) + cgofiles, err := cgo.ProcessFiles(bp, conf.fset(), conf.DisplayPath, conf.ParserMode) if err != nil { errs = append(errs, err) } else { diff --git a/vendor/golang.org/x/tools/imports/fix.go b/vendor/golang.org/x/tools/imports/fix.go index e556dfeb9b87..af0067053b83 100644 --- a/vendor/golang.org/x/tools/imports/fix.go +++ b/vendor/golang.org/x/tools/imports/fix.go @@ -1004,7 +1004,7 @@ func pkgIsCandidate(filename, pkgIdent string, pkg *pkg) bool { // permit a directory "foo" to be package // "bar", which is strongly discouraged // anyway. There's no reason goimports needs - // to be slow just to accomodate that. + // to be slow just to accommodate that. lastTwo := lastTwoComponents(pkg.importPathShort) if strings.Contains(lastTwo, pkgIdent) { return true