504 Commits

Author SHA1 Message Date
Trevor Pounds
21fda1d67c Enable consistent GOPROXY Go 1.12/1.13 behavior. 2019-09-23 15:30:15 -04:00
Denis Isaev
4e439b4304 Fix #608: use forked bodyclose
Until timakin/bodyclose#20 merged use forked version.
2019-09-23 22:19:41 +03:00
Denis Isaev
2fc8b7b788 Drop memory usage of go/analysis linters 5x
Set analysis pass results to nil early to garbage collect them
soon.
Memory can be reduced for the following linters:
  - staticcheck
  - stylecheck
  - gosimple
  - govet
  - bodyclose
  - any future go/analysis linter

Relates: #712, #634, #628, #598, #509, #483, #337
2019-09-23 21:58:47 +03:00
Trevor Pounds
49297189a1 Manage build tools via go.mod. 2019-09-23 21:30:20 +03:00
NiseVoid
9976bdcc5e Update whitespace 2019-09-23 12:16:06 -04:00
Denis Isaev
3aade55e05 Reduce memory usage of go/analysis 2019-09-23 09:52:54 +03:00
Trevor Pounds
358ce7c20c Enable Go module support across all commands. (#717) 2019-09-21 08:35:45 +03:00
Trevor Pounds
a653032409 Fix flaky cgo test failures. (#716)
Fixes flaky cgo test failures caused by duplicate printf
format checks in staticcheck and go vet that use slightly
different reporting formats.
2019-09-20 19:05:01 +03:00
Trevor Pounds
1040e34da2 Update to shirou/gopsutil v2.19.8. (#714)
Note, dependency has to be pinned to a specific release version
commit hashes since it doesn't follow Go module v2+ guidelines.

see:
https://github.com/shirou/gopsutil/issues/663
https://github.com/golang/go/issues/34402
2019-09-20 19:03:50 +03:00
Trevor Pounds
0eed06c99c Update to spf13/pflag v1.0.5. (#713)
Fixes #711
Fixes https://github.com/spf13/pflag/issues/218
2019-09-19 13:58:28 +03:00
Trevor Pounds
92168d033d Add dogsled linter. (#705) 2019-09-17 08:44:53 +03:00
Isaev Denis
6a979fb40d
Update staticcheck and cache go/analysis facts (#699)
* update staticcheck

Don't fork staticcheck: use the upstream version.
Remove unneeded SSA loading.

* Cache go/analysis facts

Don't load unneeded packages for go/analysis.
Repeated run of go/analysis linters now 10x faster
(2s vs 20s on this repo) than before.
2019-09-17 08:42:16 +03:00
Trevor Pounds
0e0cd753d2 Update to valyala/quicktemplate v1.2.0 (#704)
* Update to valyala/quicktemplate v1.2.0.

* Cleanup out-of-band dep updates that bypass go.mod.
2019-09-16 19:51:29 +03:00
Trevor Pounds
b8145d6fe6 Update to latest mvdan.cc/unparam. (#703) 2019-09-16 19:50:17 +03:00
Aleksandr Razumov
f3f5dfc3eb govet: implement analyzers config (#697) 2019-09-16 00:15:08 +03:00
Will Dixon
9161de5b7d 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
2019-09-15 14:13:16 +03:00
Denis Isaev
fc8d614b2b
speedup skip-dirs processing by caching 2019-09-14 20:15:11 +03:00
Denis Isaev
4fd88b9b7e
dev: update go.sum 2019-09-14 19:36:16 +03:00
Trevor Pounds
e750fd1d15 Update to latest securego/gosec. (#694)
Fixes https://github.com/securego/gosec/pull/366.
2019-09-14 19:34:59 +03:00
Trevor Pounds
6ec8ff2271 Update Dockerfile to Go 1.13. (#695)
Fixes #683.
2019-09-14 19:33:10 +03:00
Isaev Denis
c9a9255238
Speed up packages loading (#693)
Don't perform extra go env calls in go/packages.
Load only needed go env vars in golangci-lint.
Stay in sync by enabled analyzers in go vet: remove nilness and
atomicalign analyzers, add errorsas analyzer.
Don't build SSA for govet.

Standalone govet runs 25% faster than before. All runs can be 5-10% faster
than before.
Relates: #208
2019-09-14 18:48:18 +03:00
Denis Isaev
4ffe85cae8
docs: update changelog 2019-09-14 14:15:27 +03:00
David López
064c0e3d67 readme: split changelog into own file (#689)
split changelog into own file. closes #688.
2019-09-14 14:07:14 +03:00
Trevor Pounds
bf68434103 Fix replaced dependencies (#691)
* Update to ultraware/funlen v0.0.2.

Fixes https://github.com/ultraware/funlen/pull/1.

* Update to latest golang.org/x/tools.

Fixes #687.
Fixes https://github.com/golang/tools/pull/139.
2019-09-14 14:06:10 +03:00
Trevor Pounds
2e8d83266f Update dependencies. (#684)
* Update deps.

* Update to Node.js v10.16.3 LTS.

* Fix mock logutils generation.
2019-09-12 16:02:43 +03:00
Isaev Denis
bf67a3eef3
update gosec (#681) 2019-09-11 17:46:26 +03:00
Isaev Denis
b08335850e
update scopelint (#680) 2019-09-11 17:35:08 +03:00
Isaev Denis
94eaa8f196
update go-critic (#679)
Go-critic got a new checker `regexpPattern`.
2019-09-11 16:56:33 +03:00
Matouš Dzivjak
58845813da linters: add Godox linter support (#621)
Godox is linter for TODOs and FIXMEs left in the code.

Signed-off-by: Matous Dzivjak <matous.dzivjak@kiwi.com>
2019-09-11 16:53:40 +03:00
Christoph Blecker
c215cffd53 Add bash completion to homebrew formula (#676) 2019-09-11 16:51:27 +03:00
Denis Isaev
4495f893b9
Log go/analysis panics, don't crash
go/analysis panics were propagated to main and crashed golangci-lint.
Just log them, as with other linters.
Found in #608.
2019-09-10 18:49:34 +03:00
Isaev Denis
f1c1dbfab4
Feature/enable autofix on whitespace (#674)
The whitespace linter was added in #673. Enable it and fix found issues.
Add auto-fixing to the whitespace linter.
2019-09-10 16:56:44 +03:00
NiseVoid
c7dee2c0b2 Add whitespace linter (#673) 2019-09-10 13:25:01 +03:00
Denis Isaev
31afdf8b04
dev: build by go1.13 for release v1.18.0 2019-09-10 12:14:24 +03:00
Denis Isaev
5fb91e6434
docs: document bash completion in README
Also, change command `golangci-lint completion`
  to `golangci-lint completion bash`.
2019-09-10 12:06:10 +03:00
Christoph Blecker
91e90eba6b Add support for bash completions (#640) 2019-09-10 11:30:02 +03:00
Fei Xu
4ed1349a6b add kubeedge (#636) 2019-09-10 11:25:26 +03:00
Glen Mailer
97fcafd38c Update format of junit xml output to mark failures as such (#632) 2019-09-10 11:21:08 +03:00
Denis Isaev
bad04bb737
dev: regenerate README.md after #630
Also, output help for the new option in a more compact way.
2019-09-10 11:17:18 +03:00
Sean DuBois
f312a0fc4e fix #416: Add skip-dirs-use-default (#630) 2019-09-10 11:14:25 +03:00
Isaev Denis
c87c37210f
dev: update install.sh (#672) 2019-09-10 11:09:39 +03:00
Denis Isaev
95d5b2c071
dev: fix golang.org/x/tools revision date
Use git log --pretty=fuller to distinguish between
AuthorDate and CommitDate. Use CommitDate for go.mod.
2019-09-10 11:02:54 +03:00
Denis Isaev
e691e606b1
dev: fix updated golangci/tools revision 2019-09-10 10:59:34 +03:00
Denis Isaev
5d50b907dd
dev: update replaced version of x/tools
Make it possible to run GO111MODULE=on go get
        github.com/golangci/golangci-lint/cmd/golangci-lint@master
2019-09-10 10:34:01 +03:00
Juan Carlos
338e3fbf24 Fix install script on Windows (#626)
`adjust_format()` should use OS and not ARCH. In Windows, `$OS` will be calculated to be `"windows"` while `$ARCH` will be `"386"` or `"amd64"` (most of the time). `$ARCH` will surely never be `"windows"`.
2019-09-10 10:05:15 +03:00
Isaev Denis
6163a8a790
Support go1.13 (#670)
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.
2019-09-09 21:54:56 +03:00
Cody Ley-Han
a8f2c27d1d Add user supplied error messages in depguard issues (#662) 2019-09-09 20:46:55 +03:00
Matthew Poer
a02e3f573b Updates README with additional nolint notes (#644)
Fixes #642
2019-09-09 20:43:21 +03:00
Alex Dupre
f84095a973 Build FreeBSD binaries (#613) 2019-09-09 18:56:18 +03:00
Isaev Denis
6864b2f764
dev: enable funlen on repo (#668) 2019-09-09 18:07:09 +03:00