Skip to content

Commit 9161de5

Browse files
Will Dixonjirfag
Will Dixon
authored andcommitted
Upgrade depguard to fix performance issue with go modules (#698)
* Upgrade depguard to fix performance issue with go modules * Fix linting error of unused function
1 parent fc8d614 commit 9161de5

File tree

15 files changed

+95
-189
lines changed

15 files changed

+95
-189
lines changed

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ linters:
4848
enable:
4949
- bodyclose
5050
- deadcode
51+
- depguard
5152
- dupl
5253
- errcheck
5354
# - funlen - TODO: enable it when golangci.com will support it.
@@ -79,7 +80,6 @@ linters:
7980
# - whitespace - TODO: enable it when golangci.com will support it.
8081

8182
# don't enable:
82-
# - depguard - until https://github.com/OpenPeeDeeP/depguard/issues/7 gets fixed
8383
# - maligned,prealloc
8484
# - gochecknoglobals
8585

Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ clean:
1414
.PHONY: fast_build build build_race clean
1515

1616
# Test
17-
18-
# until https://github.com/OpenPeeDeeP/depguard/issues/7 fixed
19-
test: export GO111MODULE = off
17+
test: export GO111MODULE = on
2018
test: export GOLANGCI_LINT_INSTALLED = true
2119

2220
test: build

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,7 @@ linters:
907907
enable:
908908
- bodyclose
909909
- deadcode
910+
- depguard
910911
- dupl
911912
- errcheck
912913
# - funlen - TODO: enable it when golangci.com will support it.
@@ -938,7 +939,6 @@ linters:
938939
# - whitespace - TODO: enable it when golangci.com will support it.
939940
940941
# don't enable:
941-
# - depguard - until https://github.com/OpenPeeDeeP/depguard/issues/7 gets fixed
942942
# - maligned,prealloc
943943
# - gochecknoglobals
944944

go.mod

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@ module github.com/golangci/golangci-lint
33
go 1.11
44

55
require (
6-
github.com/OpenPeeDeeP/depguard v1.0.0
6+
github.com/OpenPeeDeeP/depguard v1.0.1
77
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
88
github.com/fatih/color v1.7.0
99
github.com/go-critic/go-critic v0.3.5-0.20190904082202-d79a9f0c64db
1010
github.com/go-lintpack/lintpack v0.5.2
1111
github.com/go-ole/go-ole v1.2.4 // indirect
12-
github.com/gobwas/glob v0.2.3 // indirect
1312
github.com/golang/mock v1.3.1
1413
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2
1514
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT
22
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
33
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
44
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
5-
github.com/OpenPeeDeeP/depguard v1.0.0 h1:k9QF73nrHT3nPLz3lu6G5s+3Hi8Je36ODr1F5gjAXXM=
6-
github.com/OpenPeeDeeP/depguard v1.0.0/go.mod h1:7/4sitnI9YlQgTLLk734QlzXT8DuHVnAyztLplQjk+o=
5+
github.com/OpenPeeDeeP/depguard v1.0.1 h1:VlW4R6jmBIv3/u1JNlawEvJMM4J+dPORPaZasQee8Us=
6+
github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM=
77
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d h1:G0m3OIz70MZUWq3EgK3CesDbo8upS2Vm9/P3FtgI+Jk=
88
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
99
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=

pkg/lint/runner.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ func NewRunner(astCache *astcache.Cache, cfg *config.Config, log logutils.Log, g
9292
}, nil
9393
}
9494

95-
func someUnusedFunc() {}
96-
9795
type lintRes struct {
9896
linter *linter.Config
9997
err error

vendor/github.com/OpenPeeDeeP/depguard/.gitignore

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/OpenPeeDeeP/depguard/Gopkg.lock

Lines changed: 0 additions & 43 deletions
This file was deleted.

vendor/github.com/OpenPeeDeeP/depguard/Gopkg.toml

Lines changed: 0 additions & 43 deletions
This file was deleted.

vendor/github.com/OpenPeeDeeP/depguard/README.md

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/OpenPeeDeeP/depguard/depguard.go

Lines changed: 61 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/OpenPeeDeeP/depguard/go.mod

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/OpenPeeDeeP/depguard/go.sum

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)