Skip to content

Commit

Permalink
Update dependencies. (#684)
Browse files Browse the repository at this point in the history
* Update deps.

* Update to Node.js v10.16.3 LTS.

* Fix mock logutils generation.
  • Loading branch information
tpounds authored and jirfag committed Sep 12, 2019
1 parent bf67a3e commit 2e8d832
Show file tree
Hide file tree
Showing 182 changed files with 8,290 additions and 3,245 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go:

env:
global:
- NODE_VERSION=10.15.0
- NODE_VERSION=10.16.3

before_script:
# use GO111MODULE=off otherwise libs can't be updates inside vendor/
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ test_linters:

# Maintenance

generate: README.md docs/demo.svg install.sh pkg/logutils/log_mock.go vendor
generate: README.md docs/demo.svg install.sh pkg/logutils/mock_logutils/mock_log.go vendor
fast_generate: README.md vendor

maintainer-clean: clean
rm -f docs/demo.svg README.md install.sh pkg/logutils/log_mock.go
rm -f docs/demo.svg README.md install.sh pkg/logutils/mock_logutils/mock_log.go
rm -rf vendor
.PHONY: generate maintainer-clean

Expand All @@ -67,7 +67,7 @@ release:

# Non-PHONY targets (real files)

golangci-lint: FORCE pkg/logutils/log_mock.go
golangci-lint: FORCE pkg/logutils/mock_logutils/mock_log.go
go build -o $@ ./cmd/golangci-lint

tools/mockgen: go.mod go.sum
Expand Down Expand Up @@ -103,7 +103,7 @@ install.sh: tools/godownloader .goreleaser.yml
README.md: FORCE golangci-lint
go run ./scripts/gen_readme/main.go

pkg/logutils/log_mock.go: tools/mockgen tools/goimports pkg/logutils/log.go
pkg/logutils/mock_logutils/mock_log.go: tools/mockgen tools/goimports pkg/logutils/log.go
@rm -f $@
PATH=$(CURDIR)/tools:$${PATH} go generate ./...

Expand Down
36 changes: 12 additions & 24 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ module github.com/golangci/golangci-lint
go 1.11

require (
github.com/BurntSushi/toml v0.3.1 // indirect
github.com/OpenPeeDeeP/depguard v1.0.0
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect
github.com/fatih/color v1.6.0
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
github.com/fatih/color v1.7.0
github.com/go-critic/go-critic v0.3.5-0.20190904082202-d79a9f0c64db
github.com/go-lintpack/lintpack v0.5.2
github.com/go-ole/go-ole v1.2.1 // indirect
github.com/go-ole/go-ole v1.2.4 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/golang/mock v1.0.0
github.com/golang/mock v1.3.1
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a
github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6
Expand All @@ -28,35 +27,24 @@ require (
github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21
github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4
github.com/hashicorp/hcl v0.0.0-20180404174102-ef8a98b0bbce // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/magiconair/properties v1.7.6 // indirect
github.com/matoous/godox v0.0.0-20190910121045-032ad8106c86
github.com/mattn/go-colorable v0.0.9
github.com/mattn/go-isatty v0.0.3 // indirect
github.com/mitchellh/go-homedir v1.0.0
github.com/mitchellh/go-ps v0.0.0-20170309133038-4fdf99ab2936
github.com/mitchellh/mapstructure v0.0.0-20180220230111-00c29f56e238 // indirect
github.com/pelletier/go-toml v1.1.0 // indirect
github.com/mattn/go-colorable v0.1.2
github.com/mitchellh/go-homedir v1.1.0
github.com/mitchellh/go-ps v0.0.0-20190716172923-621e5597135b
github.com/pkg/errors v0.8.1
github.com/shirou/gopsutil v0.0.0-20180427012116-c95755e4bcd7
github.com/shirou/gopsutil v2.18.12+incompatible
github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4 // indirect
github.com/sirupsen/logrus v1.0.5
github.com/sirupsen/logrus v1.4.2
github.com/sourcegraph/go-diff v0.5.1
github.com/spf13/afero v1.1.0 // indirect
github.com/spf13/cast v1.2.0 // indirect
github.com/spf13/cobra v0.0.2
github.com/spf13/jwalterweatherman v0.0.0-20180109140146-7c0cea34c8ec // indirect
github.com/spf13/pflag v1.0.1
github.com/spf13/viper v1.0.2
github.com/spf13/cobra v0.0.5
github.com/spf13/pflag v1.0.3
github.com/spf13/viper v1.4.0
github.com/stretchr/testify v1.4.0
github.com/timakin/bodyclose v0.0.0-20190721030226-87058b9bfcec
github.com/ultraware/funlen v0.0.1
github.com/ultraware/whitespace v0.0.2
github.com/valyala/quicktemplate v1.1.1
golang.org/x/tools v0.0.0-20190911022129-16c5e0f7d110
gopkg.in/airbrake/gobrake.v2 v2.0.9 // indirect
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 // indirect
gopkg.in/yaml.v2 v2.2.2
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect
Expand Down
192 changes: 138 additions & 54 deletions go.sum

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion pkg/golinters/gofmt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/stretchr/testify/assert"

"github.com/golangci/golangci-lint/pkg/logutils"
"github.com/golangci/golangci-lint/pkg/logutils/mock_logutils"
)

func testDiffProducesChanges(t *testing.T, log logutils.Log, diff string, expectedChanges ...Change) {
Expand Down Expand Up @@ -131,7 +132,7 @@ index 0000000..6399915

ctrl := gomock.NewController(t)
defer ctrl.Finish()
log := logutils.NewMockLog(ctrl)
log := mock_logutils.NewMockLog(ctrl)
log.EXPECT().Infof("The diff contains only additions: no original or deleted lines: %#v", gomock.Any())
var noChanges []Change
testDiffProducesChanges(t, log, diff, noChanges...)
Expand Down
4 changes: 2 additions & 2 deletions pkg/logutils/log.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package logutils

//go:generate mockgen -package logutils -source log.go -destination log_mock.go
//go:generate goimports -w log_mock.go
//go:generate mockgen -source log.go -destination mock_logutils/mock_log.go
//go:generate goimports -w mock_logutils/mock_log.go

type Log interface {
Fatalf(format string, args ...interface{})
Expand Down
115 changes: 0 additions & 115 deletions pkg/logutils/log_mock.go

This file was deleted.

129 changes: 129 additions & 0 deletions pkg/logutils/mock_logutils/mock_log.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions pkg/result/processors/nolint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (

"github.com/golangci/golangci-lint/pkg/lint/astcache"
"github.com/golangci/golangci-lint/pkg/logutils"
"github.com/golangci/golangci-lint/pkg/logutils/mock_logutils"
"github.com/golangci/golangci-lint/pkg/result"
)

Expand Down Expand Up @@ -42,8 +43,8 @@ func newTestNolintProcessor(log logutils.Log) *Nolint {
return NewNolint(cache, log, lintersdb.NewManager(nil))
}

func getOkLogger(ctrl *gomock.Controller) *logutils.MockLog {
log := logutils.NewMockLog(ctrl)
func getOkLogger(ctrl *gomock.Controller) *mock_logutils.MockLog {
log := mock_logutils.NewMockLog(ctrl)
log.EXPECT().Infof(gomock.Any(), gomock.Any()).AnyTimes()
return log
}
Expand Down
Loading

0 comments on commit 2e8d832

Please sign in to comment.