168 Commits

Author SHA1 Message Date
dependabot[bot]
78b742f289
build(deps): bump honnef.co/go/tools (#1286)
Bumps [honnef.co/go/tools](https://github.com/dominikh/go-tools) from 0.0.1-2020.1.4 to 0.0.1-2020.1.5.
- [Release notes](https://github.com/dominikh/go-tools/releases)
- [Commits](https://github.com/dominikh/go-tools/compare/v0.0.1-2020.1.4...v0.0.1-2020.1.5)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-03 08:30:14 -05:00
dependabot[bot]
fcfcf81886
build(deps): bump github.com/ssgreg/nlreturn/v2 from 2.0.1 to 2.0.2 (#1287)
Bumps [github.com/ssgreg/nlreturn/v2](https://github.com/ssgreg/nlreturn) from 2.0.1 to 2.0.2.
- [Release notes](https://github.com/ssgreg/nlreturn/releases)
- [Changelog](https://github.com/ssgreg/nlreturn/blob/master/.goreleaser.yml)
- [Commits](https://github.com/ssgreg/nlreturn/compare/v2.0.1...v2.0.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-03 08:20:39 -05:00
dependabot[bot]
3ae248e21a
build(deps): bump github.com/valyala/quicktemplate from 1.5.1 to 1.6.0 (#1288)
Bumps [github.com/valyala/quicktemplate](https://github.com/valyala/quicktemplate) from 1.5.1 to 1.6.0.
- [Release notes](https://github.com/valyala/quicktemplate/releases)
- [Commits](https://github.com/valyala/quicktemplate/compare/v1.5.1...v1.6.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-03 08:19:56 -05:00
Grigory Zubankov
6b60cb8a30
new nlreturn linter (#1267)
* new nlreturn linter

* fix: import order

Co-authored-by: Sergey Vilgelm <sergey.vilgelm@ibm.com>
2020-08-02 15:16:45 -05:00
dependabot[bot]
4354a648ed
build(deps): bump github.com/securego/gosec/v2 from 2.3.0 to 2.4.0 (#1273)
* build(deps): bump github.com/securego/gosec/v2 from 2.3.0 to 2.4.0

Bumps [github.com/securego/gosec/v2](https://github.com/securego/gosec) from 2.3.0 to 2.4.0.
- [Release notes](https://github.com/securego/gosec/releases)
- [Changelog](https://github.com/securego/gosec/blob/master/.goreleaser.yml)
- [Commits](https://github.com/securego/gosec/compare/v2.3.0...v2.4.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Rename Blacklisted -> Blocklisted

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sergey Vilgelm <sergey.vilgelm@ibm.com>
2020-08-02 14:48:26 -05:00
Xiang Dai
60613dc3eb
Introduce gci as new linter (#1266)
* Introduce gci as new linter

Signed-off-by: Xiang Dai <long0dai@foxmail.com>

* use goimports setting if not specified

Signed-off-by: Xiang Dai <long0dai@foxmail.com>
2020-07-28 13:55:02 +03:00
dependabot[bot]
ba48f30fdc
build(deps): bump github.com/tetafro/godot from 0.4.2 to 0.4.8 (#1261)
Bumps [github.com/tetafro/godot](https://github.com/tetafro/godot) from 0.4.2 to 0.4.8.
- [Release notes](https://github.com/tetafro/godot/releases)
- [Changelog](https://github.com/tetafro/godot/blob/master/.goreleaser.yml)
- [Commits](https://github.com/tetafro/godot/compare/v0.4.2...v0.4.8)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-23 15:42:56 +08:00
Sergey Vilgelm
c8bd9549a5
Support --fix for gofumpt (#1239) 2020-07-18 21:33:47 -05:00
Nishanth
6dd10ac1eb
upgrade github.com/nishanths/exhaustive (#1246)
This pulls in a fix for handling of blank identifiers by the exhaustive
package.

Patch obtained by running:

```
go get github.com/nishanths/exhaustive
```
2020-07-15 23:36:09 +10:00
dependabot-preview[bot]
cb3f67f88a
build(deps): bump github.com/valyala/quicktemplate from 1.5.0 to 1.5.1 (#1240)
Bumps [github.com/valyala/quicktemplate](https://github.com/valyala/quicktemplate) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/valyala/quicktemplate/releases)
- [Commits](https://github.com/valyala/quicktemplate/compare/v1.5.0...v1.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-07-13 17:10:02 -05:00
dependabot-preview[bot]
65e1b30ebd
build(deps): bump github.com/kyoh86/exportloopref from 0.1.4 to 0.1.7 (#1214)
* build(deps): bump github.com/kyoh86/exportloopref from 0.1.4 to 0.1.7

Bumps [github.com/kyoh86/exportloopref](https://github.com/kyoh86/exportloopref) from 0.1.4 to 0.1.7.
- [Release notes](https://github.com/kyoh86/exportloopref/releases)
- [Changelog](https://github.com/kyoh86/exportloopref/blob/master/.goreleaser.yml)
- [Commits](https://github.com/kyoh86/exportloopref/compare/v0.1.4...v0.1.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Fix exportloopref linter

Change the WithLoadMode to use LoadModeTypesInfo isntead of LoadModeSyntax

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Sergey Vilgelm <sergey.vilgelm@ibm.com>
2020-07-12 21:41:06 +02:00
Melvin
ee86e0e893
gofumpt: Add extra-rules option + update linter (#1228)
Co-authored-by: Sergey Vilgelm <sergey.vilgelm@ibm.com>
2020-07-12 11:38:07 -05:00
dependabot-preview[bot]
4fb9fe59f9
build(deps): bump github.com/mattn/go-colorable from 0.1.6 to 0.1.7 (#1213)
Some checks failed
CI / golangci-lint (push) Failing after 25m45s
Release a tag / release (push) Failing after 25m43s
CI / tests-on-windows (push) Has been cancelled
CI / tests-on-unix (1.13, ubuntu-latest) (push) Has been cancelled
CI / tests-on-unix (1.14, ubuntu-latest) (push) Has been cancelled
CI / check_generated (push) Has been cancelled
Bumps [github.com/mattn/go-colorable](https://github.com/mattn/go-colorable) from 0.1.6 to 0.1.7.
- [Release notes](https://github.com/mattn/go-colorable/releases)
- [Commits](https://github.com/mattn/go-colorable/compare/v0.1.6...v0.1.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-07-08 14:02:19 +02:00
iwankgb
306cbb0e6e
Upgrading to go-critic v0.5.0 (#1205)
Some checks failed
CI / golangci-lint (push) Failing after 3m54s
CI / tests-on-windows (push) Has been skipped
CI / tests-on-unix (1.13, ubuntu-latest) (push) Has been skipped
CI / tests-on-unix (1.14, ubuntu-latest) (push) Has been skipped
CI / check_generated (push) Has been skipped
Release a tag / release (push) Failing after 4m22s
2020-07-04 20:07:26 +00:00
Denis Tingaikin
01b566a646
Add go-header linter (#1181)
* add go-header linter
* apply review comments: add goheader example into .golangci.example.yml
* apply review comments: correctly handle multiline comments
2020-07-04 19:03:37 +00:00
Ryan Olds
b22e3f1874
Added sqlclosecheck to linters (#1203)
* Added sqlclosecheck to linters
* Addressed feedback
* Updated sqlclosecheck and tools
2020-07-04 14:30:16 +00:00
Teiva Harsanyi
38d298c2c8
Adding gofumpt (#1177) 2020-06-16 13:05:28 +03:00
dependabot-preview[bot]
36a5a4000a
build(deps): bump github.com/stretchr/testify from 1.6.0 to 1.6.1 (#1183)
Bumps github.com/stretchr/testify from 1.6.0 to 1.6.1.
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-08 20:33:07 +00:00
sonata
f1a46f9861
Add Noctx (#1179)
Support for linter that enforces using context on each `http.Request`
https://github.com/sonatard/noctx
2020-06-08 20:21:58 +00:00
dependabot-preview[bot]
b784f4433c
build(deps): bump github.com/stretchr/testify from 1.5.1 to 1.6.0 (#1174)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.5.1 to 1.6.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.5.1...v1.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-07 16:07:22 +00:00
dependabot-preview[bot]
a393ef74cb
build(deps): bump github.com/sourcegraph/go-diff from 0.5.2 to 0.5.3 (#1173)
Bumps [github.com/sourcegraph/go-diff](https://github.com/sourcegraph/go-diff) from 0.5.2 to 0.5.3.
- [Release notes](https://github.com/sourcegraph/go-diff/releases)
- [Commits](https://github.com/sourcegraph/go-diff/compare/v0.5.2...v0.5.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-03 14:16:47 +03:00
Nishanth Shanmugham
f3376cab71
add exhaustive linter (#1166)
* wip

more

add new files

run command fixes

more

* go.mod

* order

* same package

* review comment

* enable linter in .golangci.yml

* add testcase for default-signifies-exhaustive: true

* adjust runGoErrchk instead

* disable the linter

* cleanup

* more cleanup

* cleanup
2020-05-29 16:31:46 +03:00
Ryan Currah
fa7adcbda9
add ability to set issue severity (#1155)
* add ability to set issue severity for out formats that support it based on severity rules

* fix lint issues

* change log child name

* code climate omit severity if empty

* add tests for severity rules, add support for case sensitive rules, fix lint issues, better doc comments, share processor test

* deduplicated rule logic into a base rule that can be used by multiple rule types, moved severity config to it's own parent key named severity, reduced size of NewRunner function to make it easier to read

* put validate function under base rule struct

* better validation error wording

* add Fingerprint and Description methods to Issue struct, made codeclimate reporter easier to read, checkstyle output is now pretty printed
2020-05-25 08:21:42 -04:00
Tam Mach
dc260be693
Add exportloopref linter (#1163) 2020-05-24 10:31:32 +03:00
dependabot-preview[bot]
54f83ae521
build(deps): bump github.com/go-critic/go-critic from 0.4.1 to 0.4.3 (#1148)
* build(deps): bump github.com/go-critic/go-critic from 0.4.1 to 0.4.3

Bumps [github.com/go-critic/go-critic](https://github.com/go-critic/go-critic) from 0.4.1 to 0.4.3.
- [Release notes](https://github.com/go-critic/go-critic/releases)
- [Commits](https://github.com/go-critic/go-critic/compare/v0.4.1...v0.4.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Disable unnecessaryDefer from go-critic due to false positive

* Disable by regex, not check

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Simon Sawert <simon@sawert.se>
2020-05-19 09:54:27 +03:00
dependabot-preview[bot]
cd34a1efc8
build(deps): bump github.com/spf13/viper from 1.6.1 to 1.7.0 (#1146)
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.6.1 to 1.7.0.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.6.1...v1.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-18 16:14:01 +03:00
Denis Krivak
7c2871c596
godot: add autofix mode 2020-05-18 15:49:58 +03:00
dependabot-preview[bot]
09df97a5bf
build(deps): bump github.com/mattn/go-colorable from 0.1.4 to 0.1.6 (#1147)
Bumps [github.com/mattn/go-colorable](https://github.com/mattn/go-colorable) from 0.1.4 to 0.1.6.
- [Release notes](https://github.com/mattn/go-colorable/releases)
- [Commits](https://github.com/mattn/go-colorable/compare/v0.1.4...v0.1.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-18 13:25:58 +03:00
dependabot-preview[bot]
514725578e
build(deps): bump honnef.co/go/tools (#1145)
Bumps [honnef.co/go/tools](https://github.com/dominikh/go-tools) from 0.0.1-2020.1.3 to 0.0.1-2020.1.4.
- [Release notes](https://github.com/dominikh/go-tools/releases)
- [Commits](https://github.com/dominikh/go-tools/compare/v0.0.1-2020.1.3...v0.0.1-2020.1.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-18 13:25:12 +03:00
Ryan Currah
778e08fda4
bump gomodguard version (#1140)
* bump gomodguard version which adds a new feature to allow blocking modules based on version constraints

* add description why you may want to use gomodguard over depguard, updated example config and add a section the contributor doc page to remind people to update the example config
2020-05-17 22:35:13 +03:00
dependabot-preview[bot]
f3380053af
build(deps): bump github.com/sourcegraph/go-diff from 0.5.1 to 0.5.2 (#1136)
Bumps [github.com/sourcegraph/go-diff](https://github.com/sourcegraph/go-diff) from 0.5.1 to 0.5.2.
- [Release notes](https://github.com/sourcegraph/go-diff/releases)
- [Commits](https://github.com/sourcegraph/go-diff/compare/v0.5.1...v0.5.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-17 16:32:34 +03:00
dependabot-preview[bot]
6bd04abfac
build(deps): bump github.com/valyala/quicktemplate from 1.2.0 to 1.5.0 (#1134)
Bumps [github.com/valyala/quicktemplate](https://github.com/valyala/quicktemplate) from 1.2.0 to 1.5.0.
- [Release notes](https://github.com/valyala/quicktemplate/releases)
- [Commits](https://github.com/valyala/quicktemplate/compare/v1.2.0...v1.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-17 16:31:44 +03:00
dependabot-preview[bot]
d7bf70a0c0
build(deps): bump github.com/bombsimon/wsl/v3 from 3.0.0 to 3.1.0 (#1137)
Bumps [github.com/bombsimon/wsl/v3](https://github.com/bombsimon/wsl) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/bombsimon/wsl/releases)
- [Commits](https://github.com/bombsimon/wsl/compare/v3.0.0...v3.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-17 16:20:59 +03:00
renovate[bot]
d01488eaae
chore(deps): update module gofrs/flock to v0.7.1 (#1114)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-05-17 16:01:03 +03:00
renovate[bot]
3aee873b7f
chore(deps): update module fatih/color to v1.9.0 (#1112)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-05-17 15:58:58 +03:00
renovate[bot]
5bdeb74d5b
chore(deps): update module pkg/errors to v0.9.1 (#1118)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-05-17 15:58:38 +03:00
renovate[bot]
6f45db7fbd
chore(deps): update module sirupsen/logrus to v1.6.0 (#1120)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-05-17 15:57:20 +03:00
renovate[bot]
55405f01a4
chore(deps): update module mitchellh/go-ps to v1 (#1127)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-05-17 13:41:27 +03:00
renovate[bot]
b1f294b8f5
chore(deps): update module yaml to v2.3.0 (#1126)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-05-17 13:40:51 +03:00
renovate[bot]
73a9aadce8
chore(deps): update module spf13/cobra to v1 (#1129)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-05-17 13:40:16 +03:00
renovate[bot]
3be4269042
chore(deps): update github.com/golangci/gocyclo commit hash to 0a533e8 (#1101)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-05-16 23:58:21 +03:00
renovate[bot]
8959cdc3a6
chore(deps): update github.com/djarvur/go-err113 commit hash to 5174e21 (#1099)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-05-16 23:40:45 +03:00
Tim Heckman
f0012d3248
Update gosec2 dependency to a tagged version (v2.3.0) (#1079)
When raising #1062 I noted that the gosec dependency had been upgraded to v2,
but needed to be pulled from `master` due to some issues with the v2.2.0 tagged
release. That was tracked in https://github.com/securego/gosec/issues/470.

They've since cut v2.3.0, so let's update to that tagged release before we
release a new version of golangci-lint.
2020-05-09 09:39:05 +03:00
Denis Krivak
4e99c75315
Fix godot false positive for cgo export comments (#1067)
godot: fix false positive for exported cgo code
2020-05-05 18:53:06 +03:00
Isaev Denis
279b6d62d3
speed up a bit (#1064)
Ensure that `unused` is always the last
in execution order. It can speed up packages loading
a bit.

Refactor enabled linters set to remove extra logging.

Relates: #944
2020-05-05 18:45:19 +03:00
Isaev Denis
52c9b88c25
reduce mem. usage of unused and update staticcheck (#1063)
The primary improvement is in early clearing of
analyzed package's TypeInfo, facts, etc for
whole program analyzers (`unused`). Clear it when it
becomes unused and GC collects them early. Initially this
clearing was performed for all analyzers except `unused`.

Update staticcheck from v0.0.1-2019.2.3 to v0.0.1-2020.1.4

Also in this commit:
  * speed up loading packages from export data (2.5s -> 2.1s for std)
    by not using mutex for export data since it was allowed in
    x/tools#07722704da13
  * make an order of execution of linters stable
  * update renameio and robustio
  * use robustio in caching

Relates: #987, #994, #995, #1011
2020-05-03 15:20:17 +03:00
Tim Heckman
60fd647987
Update gosec linter to v2; add .test files to .gitignore (#1062)
This change updates the `gosec` linter to its v2 version. It seems like v2
maintained API compatibility for the functionality we use, so we only needed to
update the dependency and imports.

Please note, this does not use a tagged version of `gosec` and instead is the
latest `master` commit due to this issue: https://github.com/securego/gosec/issues/470.
Once this issue is resolved we should update `gosec` to a tagged release.

This also adds a line to the `.gitignore` file, to ignore the `.test` output
files that get generated by `go test`. This could accidentally get left behind,
so no use committing binary files.

Fixes #1052
2020-05-03 14:05:00 +03:00
Denis Krivak
7fe9a44fc7 Fix indentetion issue in godot linter 2020-05-02 12:25:59 +03:00
Denis Krivak
7f4a711ce6 Update godot linter. 2020-04-29 20:27:23 +03:00
tdakkota
0d95fafefc feat: add go-err113 linter support 2020-04-27 21:37:34 +03:00