Skip to content

Commit f443182

Browse files
committed
Support go1.13
Setup Travis CI to run on go 1.12 and 1.13. Update info about go versions in README. Rebuild go.mod,go.sum on go1.13.
1 parent 6864b2f commit f443182

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+112
-6744
lines changed

.golangci.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,16 @@ linters-settings:
3939
disabled-checks:
4040
- wrapperFunc
4141
- dupImport # https://github.com/go-critic/go-critic/issues/845
42-
funlen:
43-
lines: 70
4442

4543
linters:
4644
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
4745
disable-all: true
4846
enable:
4947
- bodyclose
5048
- deadcode
51-
- depguard
5249
- dupl
5350
- errcheck
54-
- funlen
51+
# - funlen - TODO: enable it when golangci.com will support it.
5552
- gochecknoinits
5653
- goconst
5754
- gocritic
@@ -77,6 +74,11 @@ linters:
7774
- unused
7875
- varcheck
7976

77+
# don't enable:
78+
# - depguard - until https://github.com/OpenPeeDeeP/depguard/issues/7 gets fixed
79+
# - maligned,prealloc
80+
# - gochecknoglobals
81+
8082
run:
8183
skip-dirs:
8284
- test/testdata_etc

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: go
22
go:
3-
- 1.11.x
43
- 1.12.x
4+
- 1.13.x
55

66
env:
77
global:

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ maintainer-clean: clean
4040
check_generated:
4141
$(MAKE) --always-make generate
4242
git checkout -- go.mod go.sum # can differ between go1.11 and go1.12
43+
git checkout -- vendor/modules.txt # can differ between go1.12 and go1.13
4344
git diff --exit-code # check no changes
4445
.PHONY: check_generated
4546

README.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ use `--enable-all` and a new linter is added or even without `--enable-all`: whe
5252
It's highly recommended to install a fixed version of golangci-lint.
5353
Releases are available on the [releases page](https://github.com/golangci/golangci-lint/releases).
5454

55-
The recommended way to install golangci-lint (replace `vX.Y.Z` with the latest
56-
version from the [releases page](https://github.com/golangci/golangci-lint/releases)):
55+
Latest version: ![GitHub release](https://img.shields.io/github/release/golangci/golangci-lint.svg)
56+
57+
Here is the recommended way to install golangci-lint (replace `vX.Y.Z` with the latest version):
5758

5859
```bash
5960
# binary will be $(go env GOPATH)/bin/golangci-lint
@@ -868,10 +869,9 @@ linters:
868869
enable:
869870
- bodyclose
870871
- deadcode
871-
- depguard
872872
- dupl
873873
- errcheck
874-
- funlen
874+
# - funlen - TODO: enable it when golangci.com will support it.
875875
- gochecknoinits
876876
- goconst
877877
- gocritic
@@ -897,6 +897,11 @@ linters:
897897
- unused
898898
- varcheck
899899
900+
# don't enable:
901+
# - depguard - until https://github.com/OpenPeeDeeP/depguard/issues/7 gets fixed
902+
# - maligned,prealloc
903+
# - gochecknoglobals
904+
900905
run:
901906
skip-dirs:
902907
- test/testdata_etc
@@ -991,13 +996,15 @@ We don't recommend vendoring `golangci-lint` in your repo: you will get troubles
991996
No, you don't need to do it anymore.
992997
993998
**Which go versions are supported**
994-
Short answer: go 1.11 and newer are oficially supported.
999+
Short answer: go 1.12 and newer are oficially supported.
9951000
9961001
Long answer:
1002+
9971003
1. go < 1.9 isn't supported
998-
2. go 1.9 is supported by golangci-lint <= v1.10.2
999-
3. go 1.10 is officially supported by golangci-lint <= 1.15.0.
1000-
4. go1.11 and go1.12 are officially supported by the latest version of golangci-lint.
1004+
2. go1.9 is officially supported by golangci-lint <= v1.10.2
1005+
3. go1.10 is officially supported by golangci-lint <= 1.15.0.
1006+
4. go1.11 is officially supported by golangci-lint <= 1.17.1.
1007+
5. go1.12 and go1.13 are officially supported by the latest version of golangci-lint (>= 1.18.0).
10011008
10021009
**`golangci-lint` doesn't work**
10031010

README.tmpl.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ use `--enable-all` and a new linter is added or even without `--enable-all`: whe
5252
It's highly recommended to install a fixed version of golangci-lint.
5353
Releases are available on the [releases page](https://github.com/golangci/golangci-lint/releases).
5454

55-
The recommended way to install golangci-lint (replace `vX.Y.Z` with the latest
56-
version from the [releases page](https://github.com/golangci/golangci-lint/releases)):
55+
Latest version: ![GitHub release](https://img.shields.io/github/release/golangci/golangci-lint.svg)
56+
57+
Here is the recommended way to install golangci-lint (replace `vX.Y.Z` with the latest version):
5758

5859
```bash
5960
# binary will be $(go env GOPATH)/bin/golangci-lint
@@ -501,13 +502,15 @@ We don't recommend vendoring `golangci-lint` in your repo: you will get troubles
501502
No, you don't need to do it anymore.
502503

503504
**Which go versions are supported**
504-
Short answer: go 1.11 and newer are oficially supported.
505+
Short answer: go 1.12 and newer are oficially supported.
505506

506507
Long answer:
508+
507509
1. go < 1.9 isn't supported
508-
2. go 1.9 is supported by golangci-lint <= v1.10.2
509-
3. go 1.10 is officially supported by golangci-lint <= 1.15.0.
510-
4. go1.11 and go1.12 are officially supported by the latest version of golangci-lint.
510+
2. go1.9 is officially supported by golangci-lint <= v1.10.2
511+
3. go1.10 is officially supported by golangci-lint <= 1.15.0.
512+
4. go1.11 is officially supported by golangci-lint <= 1.17.1.
513+
5. go1.12 and go1.13 are officially supported by the latest version of golangci-lint (>= 1.18.0).
511514

512515
**`golangci-lint` doesn't work**
513516

go.mod

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ require (
1414
github.com/golang/mock v1.0.0
1515
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2
1616
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a
17-
github.com/golangci/errcheck v0.0.0-20181003203344-ef45e06d44b6
17+
github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6
1818
github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613
1919
github.com/golangci/go-tools v0.0.0-20190318055746-e32c54105b7c
2020
github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3
2121
github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee
2222
github.com/golangci/gofmt v0.0.0-20181222123516-0b8337e80d98
23-
github.com/golangci/gosec v0.0.0-20180901114220-66fb7fc33547
23+
github.com/golangci/gosec v0.0.0-20190211064107-66fb7fc33547
2424
github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc
25-
github.com/golangci/lint-1 v0.0.0-20180610141402-ee948d087217
25+
github.com/golangci/lint-1 v0.0.0-20190420132249-ee948d087217
2626
github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca
2727
github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770
2828
github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21
@@ -51,7 +51,7 @@ require (
5151
github.com/spf13/pflag v1.0.1
5252
github.com/spf13/viper v1.0.2
5353
github.com/stretchr/testify v1.2.2
54-
github.com/timakin/bodyclose v0.0.0-00010101000000-87058b9bfcec
54+
github.com/timakin/bodyclose v0.0.0-20190721030226-87058b9bfcec
5555
github.com/ultraware/funlen v0.0.1
5656
github.com/valyala/quicktemplate v1.1.1
5757
golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a // indirect
@@ -62,8 +62,12 @@ require (
6262
gopkg.in/yaml.v2 v2.2.1
6363
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed
6464
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect
65-
mvdan.cc/unparam v0.0.0-20190124213536-fbb59629db34
65+
mvdan.cc/unparam v0.0.0-20190209190245-fbb59629db34
6666
)
6767

68-
// https://github.com/golang/tools/pull/139
69-
replace golang.org/x/tools => github.com/golangci/tools v0.0.0-20190713050349-979bdb7f8cc8
68+
replace (
69+
// https://github.com/ultraware/funlen/pull/1
70+
github.com/ultraware/funlen => github.com/golangci/funlen v0.0.0-20190909161642-5e59b9546114
71+
// https://github.com/golang/tools/pull/139
72+
golang.org/x/tools => github.com/golangci/tools v0.0.0-20190909104219-979bdb7f8cc8
73+
)

go.sum

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ github.com/golang/mock v1.0.0 h1:HzcpUG60pfl43n9d2qbdi/3l1uKpAmxlfWEPWtV/QxM=
4545
github.com/golang/mock v1.0.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
4646
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
4747
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
48-
github.com/golangci/bodyclose v0.0.0-20190714144026-65da19158fa2 h1:nh/PMhIaxu+h8NOuhOwT2el9Ed08166oitASyNYqQzs=
49-
github.com/golangci/bodyclose v0.0.0-20190714144026-65da19158fa2/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk=
5048
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 h1:23T5iq8rbUYlhpt5DB4XJkc6BU31uODLD1o1gKvZmD0=
5149
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4=
5250
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM=
5351
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk=
54-
github.com/golangci/errcheck v0.0.0-20181003203344-ef45e06d44b6 h1:i2jIkQFb8RG45DuQs+ElyROY848cSJIoIkBM+7XXypA=
55-
github.com/golangci/errcheck v0.0.0-20181003203344-ef45e06d44b6/go.mod h1:DbHgvLiFKX1Sh2T1w8Q/h4NAI8MHIpzCdnBUDTXU3I0=
52+
github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6 h1:YYWNAGTKWhKpcLLt7aSj/odlKrSrelQwlovBpDuf19w=
53+
github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6/go.mod h1:DbHgvLiFKX1Sh2T1w8Q/h4NAI8MHIpzCdnBUDTXU3I0=
54+
github.com/golangci/funlen v0.0.0-20190909161642-5e59b9546114 h1:eubR6yxVUUlbUuBBn1ONXalxuCjCrDfKvRc0eF6Xnio=
55+
github.com/golangci/funlen v0.0.0-20190909161642-5e59b9546114/go.mod h1:kJMYlbyWK6uaK+J3BjNrQMk0t3CgLgsXgQnOlS4iGeg=
5656
github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613 h1:9kfjN3AdxcbsZBf8NjltjWihK2QfBBBZuv91cMFfDHw=
5757
github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613/go.mod h1:SyvUF2NxV+sN8upjjeVYr5W7tyxaT1JVtvhKhOn2ii8=
5858
github.com/golangci/go-tools v0.0.0-20190318055746-e32c54105b7c h1:/7detzz5stiXWPzkTlPTzkBEIIE4WGpppBJYjKqBiPI=
@@ -63,12 +63,12 @@ github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee h1:J2XAy40+7yz70u
6363
github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee/go.mod h1:ozx7R9SIwqmqf5pRP90DhR2Oay2UIjGuKheCBCNwAYU=
6464
github.com/golangci/gofmt v0.0.0-20181222123516-0b8337e80d98 h1:0OkFarm1Zy2CjCiDKfK9XHgmc2wbDlRMD2hD8anAJHU=
6565
github.com/golangci/gofmt v0.0.0-20181222123516-0b8337e80d98/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU=
66-
github.com/golangci/gosec v0.0.0-20180901114220-66fb7fc33547 h1:qMomh8bv+kDazm1dSLZ9S3zZ2PJZMHL4ilfBjxFOlmI=
67-
github.com/golangci/gosec v0.0.0-20180901114220-66fb7fc33547/go.mod h1:0qUabqiIQgfmlAmulqxyiGkkyF6/tOGSnY2cnPVwrzU=
66+
github.com/golangci/gosec v0.0.0-20190211064107-66fb7fc33547 h1:fUdgm/BdKvwOHxg5AhNbkNRp2mSy8sxTXyBVs/laQHo=
67+
github.com/golangci/gosec v0.0.0-20190211064107-66fb7fc33547/go.mod h1:0qUabqiIQgfmlAmulqxyiGkkyF6/tOGSnY2cnPVwrzU=
6868
github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc h1:gLLhTLMk2/SutryVJ6D4VZCU3CUqr8YloG7FPIBWFpI=
6969
github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc/go.mod h1:e5tpTHCfVze+7EpLEozzMB3eafxo2KT5veNg1k6byQU=
70-
github.com/golangci/lint-1 v0.0.0-20180610141402-ee948d087217 h1:r7vyX+SN24x6+5AnpnrRn/bdwBb7U+McZqCHOVtXDuk=
71-
github.com/golangci/lint-1 v0.0.0-20180610141402-ee948d087217/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg=
70+
github.com/golangci/lint-1 v0.0.0-20190420132249-ee948d087217 h1:En/tZdwhAn0JNwLuXzP3k2RVtMqMmOEK7Yu/g3tmtJE=
71+
github.com/golangci/lint-1 v0.0.0-20190420132249-ee948d087217/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg=
7272
github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca h1:kNY3/svz5T29MYHubXix4aDDuE3RWHkPvopM/EDv/MA=
7373
github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o=
7474
github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770 h1:EL/O5HGrF7Jaq0yNhBLucz9hTuRzj2LdwGBOaENgxIk=
@@ -77,8 +77,8 @@ github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21 h1:leSNB7iYzLYSS
7777
github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21/go.mod h1:tf5+bzsHdTM0bsB7+8mt0GUMvjCgwLpTapNZHU8AajI=
7878
github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0 h1:HVfrLniijszjS1aiNg8JbBMO2+E1WIQ+j/gL4SQqGPg=
7979
github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0/go.mod h1:qOQCunEYvmd/TLamH+7LlVccLvUH5kZNhbCgTHoBbp4=
80-
github.com/golangci/tools v0.0.0-20190713050349-979bdb7f8cc8 h1:rv5pCF5e6hFuSWEDuP3R+r8l0n/srMta+VWVEskASSQ=
81-
github.com/golangci/tools v0.0.0-20190713050349-979bdb7f8cc8/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
80+
github.com/golangci/tools v0.0.0-20190909104219-979bdb7f8cc8 h1:zlLYFLThJpbBZwGgIjfUzDg3gi32safjHB0omx3qtvo=
81+
github.com/golangci/tools v0.0.0-20190909104219-979bdb7f8cc8/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
8282
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 h1:zwtduBRr5SSWhqsYNgcuWO2kFlpdOZbP0+yRjmvPGys=
8383
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ=
8484
github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ=
@@ -162,10 +162,8 @@ github.com/spf13/viper v1.0.2 h1:Ncr3ZIuJn322w2k1qmzXDnkLAdQMlJqBa9kfAH+irso=
162162
github.com/spf13/viper v1.0.2/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM=
163163
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
164164
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
165-
github.com/ultraware/funlen v0.0.1 h1:UeC9tpM4wNWzUJfan8z9sFE4QCzjjzlCZmuJN+aOkH0=
166-
github.com/ultraware/funlen v0.0.1/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA=
167-
github.com/timakin/bodyclose v0.0.0-00010101000000-87058b9bfcec h1:Ha5Eixh5Dgi14hDFFWsxoB/jR95rHjB1biKdK9VKkbQ=
168-
github.com/timakin/bodyclose v0.0.0-00010101000000-87058b9bfcec/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk=
165+
github.com/timakin/bodyclose v0.0.0-20190721030226-87058b9bfcec h1:AmoEvWAO3nDx1MEcMzPh+GzOOIA5Znpv6++c7bePPY0=
166+
github.com/timakin/bodyclose v0.0.0-20190721030226-87058b9bfcec/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk=
169167
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
170168
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
171169
github.com/valyala/fasthttp v1.2.0/go.mod h1:4vX61m6KN+xDduDNwXrhIAVZaZaZiQ1luJk8LWSxF3s=
@@ -178,9 +176,6 @@ golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACk
178176
golang.org/x/net v0.0.0-20170915142106-8351a756f30f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
179177
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
180178
golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
181-
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
182-
golang.org/x/net v0.0.0-20190313220215-9f648a60d977 h1:actzWV6iWn3GLqN8dZjzsB+CLt+gaV2+wsxroxiQI8I=
183-
golang.org/x/net v0.0.0-20190313220215-9f648a60d977/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
184179
golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI=
185180
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
186181
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA=
@@ -215,7 +210,7 @@ mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed h1:WX1yoOaKQfddO/mLzdV4wp
215210
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc=
216211
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b h1:DxJ5nJdkhDlLok9K6qO+5290kphDJbHOQO1DFFFTeBo=
217212
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4=
218-
mvdan.cc/unparam v0.0.0-20190124213536-fbb59629db34 h1:B1LAOfRqg2QUyCdzfjf46quTSYUTAK5OCwbh6pljHbM=
219-
mvdan.cc/unparam v0.0.0-20190124213536-fbb59629db34/go.mod h1:H6SUd1XjIs+qQCyskXg5OFSrilMRUkD8ePJpHKDPaeY=
213+
mvdan.cc/unparam v0.0.0-20190209190245-fbb59629db34 h1:duVSyluuJA+u0BnkcLR01smoLrGgDTfWt5c8ODYG8fU=
214+
mvdan.cc/unparam v0.0.0-20190209190245-fbb59629db34/go.mod h1:H6SUd1XjIs+qQCyskXg5OFSrilMRUkD8ePJpHKDPaeY=
220215
sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4 h1:JPJh2pk3+X4lXAkZIk2RuE/7/FoK9maXw+TNPJhVS/c=
221216
sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0=

test/errchk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ var (
160160
)
161161

162162
// wantedErrors parses expected errors from comments in a file.
163-
//nolint:nakedret,gocyclo
163+
//nolint:nakedret,gocyclo,funlen
164164
func wantedErrors(file, short string) (errs []wantedError) {
165165
cache := make(map[string]*regexp.Regexp)
166166

test/run_test.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,16 @@ func TestTestsAreLintedByDefault(t *testing.T) {
5454
}
5555

5656
func TestCgoOk(t *testing.T) {
57-
testshared.NewLintRunner(t).Run("--enable-all", getTestDataDir("cgo")).ExpectNoIssues()
57+
testshared.NewLintRunner(t).Run("--no-config", "--enable-all", getTestDataDir("cgo")).ExpectNoIssues()
5858
}
5959

6060
func TestCgoWithIssues(t *testing.T) {
61-
testshared.NewLintRunner(t).Run("--enable-all", getTestDataDir("cgo_with_issues")).
61+
testshared.NewLintRunner(t).Run("--no-config", "--enable-all", getTestDataDir("cgo_with_issues")).
6262
ExpectHasIssue("Printf format %t has arg cs of wrong type")
6363
}
6464

6565
func TestUnsafeOk(t *testing.T) {
66-
testshared.NewLintRunner(t).Run("--enable-all", getTestDataDir("unsafe")).ExpectNoIssues()
66+
testshared.NewLintRunner(t).Run("--no-config", "--enable-all", getTestDataDir("unsafe")).ExpectNoIssues()
6767
}
6868

6969
func TestGovetCustomFormatter(t *testing.T) {
@@ -134,8 +134,10 @@ func TestConfigFileIsDetected(t *testing.T) {
134134

135135
func TestEnableAllFastAndEnableCanCoexist(t *testing.T) {
136136
r := testshared.NewLintRunner(t)
137-
r.Run(withCommonRunArgs("--fast", "--enable-all", "--enable=typecheck")...).ExpectNoIssues()
138-
r.Run(withCommonRunArgs("--enable-all", "--enable=typecheck")...).ExpectExitCode(exitcodes.Failure)
137+
r.Run(withCommonRunArgs("--no-config", "--fast", "--enable-all", "--enable=typecheck")...).
138+
ExpectExitCode(exitcodes.Success, exitcodes.IssuesFound)
139+
r.Run(withCommonRunArgs("--no-config", "--enable-all", "--enable=typecheck")...).
140+
ExpectExitCode(exitcodes.Failure)
139141
}
140142

141143
func TestEnabledPresetsAreNotDuplicated(t *testing.T) {

0 commit comments

Comments
 (0)