104 Commits

Author SHA1 Message Date
Denis Krivak
58572c7789 Add new linter: godot 2020-03-16 11:56:57 +03:00
Simon Sawert
d68f9933b9
Bump wsl after rebase 2020-03-15 13:40:02 +01:00
Aleksandr Razumov
517f7e5f63
Merge pull request #983 from markus-wa/master
deps: upgrade mnd from v1.1.1 to 2.0.0
2020-03-12 20:08:05 +03:00
Markus Walther
cea7e67040
deps: upgrade mnd from v1.1.1 to 2.0.0 2020-03-10 21:08:28 +00:00
Sebastiaan van Stijn
bf27481efd
update staticcheck to v2020.1.3
full diff: https://github.com/dominikh/go-tools/compare/2019.2.3...2020.1.3

Also updates tests to accomodate updated rules:

    --- FAIL: TestSourcesFromTestdataWithIssuesDir/staticcheck.go (0.43s)
            linters_test.go:137: [run --disable-all --print-issued-lines=false --print-linter-name=false --out-format=line-number --max-same-issues=10 -Estaticcheck --no-config testdata/staticcheck.go]
            linters_test.go:33:
                    Error Trace:    linters_test.go:33
                                                linters_test.go:138
                                                linters_test.go:53
                    Error:          Received unexpected error:

                                    staticcheck.go:11: no match for `self-assignment of x to x` vs ["SA4006: this value of `x` is never used"] in:
                                        staticcheck.go:11:2: SA4006: this value of `x` is never used
                                    unmatched errors
                                    staticcheck.go:11:2: SA4006: this value of `x` is never used
                    Test:           TestSourcesFromTestdataWithIssuesDir/staticcheck.go

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-10 14:55:19 +01:00
Trevor Pounds
c46c1b3224
Update to latest x/tools (#930)
* Update to latest x/tools (2020/01/19).

Fixes #893

* Initialize vet analyzers as unexportd global vars.

Fixes #915

* Support testing Go 1.14beta1.

* ci: reset go.mod and go.sum before generated diff check

* Update to latest x/tools (2020/02/04)

Co-authored-by: Aleksandr Razumov <ar@gortc.io>
2020-02-05 01:11:14 +03:00
Isaev Denis
5f1096cf80
add goprintffuncname linter (#850) 2020-01-19 16:46:51 +03:00
Trevor Pounds
1ac15487b2 Update to go-critic v0.4.1. 2020-01-12 17:36:58 -05:00
gaojingyu
e93138f00f Add rows.Err weather checked linter (#849)
Add rowserrcheck

Co-authored-by: Isaev Denis <idenx@yandex.com>
2020-01-08 14:08:16 +03:00
Hiroki Suezawa
7368dd3604 Update gosec and add column
Signed-off-by: Hiroki Suezawa <suezawa@gmail.com>
2020-01-04 17:08:51 -05:00
Trevor Pounds
a236783627 Update to github.com/go-critic/go-critic v0.4.0. 2019-12-29 19:43:24 -05:00
Trevor Pounds
2780e6f159 Update to github.com/spf13/viper v1.6.1. 2019-12-29 19:43:24 -05:00
Trevor Pounds
874b18c66b Update to gopkg.in/yaml.v2 v2.2.7. 2019-12-29 19:43:24 -05:00
Nuruddin Ashr
641cca8ed7 Update go.sum 2019-12-19 13:45:26 +07:00
Nuruddin Ashr
9fd3138fd5 Update the gocognit linter 2019-12-18 15:33:25 +07:00
sayboras
e4df56bd80 Use the release version for go-mnd (#871) 2019-11-28 09:46:19 -05:00
sayboras
bd2921655a Added go-mnd linter (#842)
* Initial commit

* Fixed goimports

* Update pkg/golinters/mnd.go

Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>

* Run goimports

* Update pkg/golinters/mnd.go

Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>

* Add prefix for goimport local

* Run make README.md

* Incorporate review comments
Add test cases

* Update readme

* Update the description

* Removed subpath in local-prefixes

* Update readme
2019-11-15 19:08:43 -05:00
Simon Sawert
0e5b7a04d5 Bump wsl to v2.0.0 2019-11-15 18:55:54 -05:00
Simon Sawert
8c1e2f004e Revert "Bump wsl to v1.2.7"
This reverts commit 14ebae29060f7c7be67d31a559986aa8afe7cbb0.
2019-11-15 18:55:54 -05:00
Simon Sawert
14ebae2906 Bump wsl to v1.2.7 2019-11-10 19:07:16 -05:00
Simon Sawert
22df2d739f Update WSL to v1.2.5 (#811)
* Update WSL to v1.2.4

* Fix false positive multiline case
* Fix false positive slice expression
* Fix false positive index expression
* Support to configure/allow cuddle declarations
* Support to configurre/allow case blocks to end with whitespace
* Support cuddle defer http body close

* Re-generate README.md

* Update WSL to v1.2.5

* Support output comments for example functions

* Fix bad field tag for config
2019-10-14 22:50:34 +03:00
Isaev Denis
48599c64ba
Make fine-grained hashing. (#814)
Speed up golint: don't typecheck packages twice.
Relates: #805
2019-10-14 09:50:57 +03:00
Isaev Denis
64b62667c0
Lock by flock to prevent parallel runs (#812) 2019-10-13 18:10:22 +03:00
Trevor Pounds
ee2e17f7e9 Update to latest securego/gosec (#792)
* Update to latest securego/gosec.

* Fix gosec G204 warnings.

* Add gosec G204 test.
2019-10-08 09:36:21 +03:00
Simon Sawert
d4b4ad8dfe Update WSL to v1.2.1 (#794)
* Update WSL to v1.2.1

* Add new tests for fixed false positives, don't derive defaults from WSL
2019-10-07 21:22:44 -04:00
Trevor Pounds
7577d548a3 Update to mattn/go-colorable v0.1.4. 2019-10-06 12:45:44 -04:00
Simon Sawert
3e09174bd2 Add WSL linter (#771)
* Add WSL linter

* Use v1.0.0 tag for wsl

* Don't add specific test file skip, use mutex to add errors

* Fix goimports error

* Add more tests for WSL, bump WSL version

* Fix bad go.sum (go mod tidy)
2019-10-04 16:03:40 -04:00
NiseVoid
fbbd24575f Update whitespace to v0.0.4 (#786) 2019-10-04 15:12:07 +03:00
Nuruddin Ashr
92ec1a1f4c Add gocognit linter (#756)
* Add gocognit linter

* Remove gocognit to the golangci config

* Make changes on README.md

* Remove gocognit from megacheck benchtest

* Remove command line flags

* Comply with new style
2019-10-03 16:22:06 +03:00
Denis Isaev
bbb0e6b208 update bodyclose 2019-09-30 16:45:45 -04:00
Isaev Denis
95ec0cf21e
dramatically reduce memory usage (#758)
Run all linters per package. It allows unloading package data when it's
processed. It dramatically reduces memory (and CPU because of GC) usage.

Relates: #337
2019-09-30 16:19:41 +03:00
Trevor Pounds
baff4ab35b Update to matoous/godox v1.0.
Dependency has to be pinned to commit hash since
tag is not a compatible semver supported by go.mod.
2019-09-29 12:47:53 -04:00
Trevor Pounds
6cc10f0615 Update to latest timakin/bodyclose. (#751)
Fixes 733
Fixes https://github.com/timakin/bodyclose/pull/20
2019-09-27 13:43:56 +03:00
Trevor Pounds
c427c61253 Use separate go.mod/go.sum to manage tool deps. (#736)
Fixes downstream `go get` issues due to broken/invalid
transitive goreleaser dependencies.

Fixes #730
2019-09-24 21:44:57 +03:00
Trevor Pounds
a16b4d872b Use stretchr/testify to mock log.
Simplifies test log usage and removes additional
targets and dependencies to go:generate mocks.
2019-09-24 11:58:40 -04:00
Denis Isaev
a2b2c7a7af Fix #733: update forked bodyclose 2019-09-24 12:15:43 +03: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
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
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
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
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
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
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
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