152 Commits

Author SHA1 Message Date
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
Aleksandr Razumov
397a6a6732
Merge branch 'upgrade-gosec' of https://github.com/rung/golangci-lint into rung-upgrade-gosec 2020-04-27 13:07:03 +03:00
Aleksandr Razumov
1373897abf
Merge branch 'tdakkota-feature/add-asciicheck-support' 2020-04-25 17:51:53 +03:00
Ryan Currah
569a19c2f0
update gomodguard 2020-04-24 23:02:38 -04:00
Aleksandr Razumov
6db0292426
mod: downgrade honnef.co/go/tools to v2019.2.3
Hotfix for `failed prerequisites` errors.
Actual cause is still unknown.

Revert: #987
Ref: #994, #995, #1011
2020-04-23 01:16:55 +03:00
Aleksandr Razumov
d00692c355
Merge branch 'nestif' of https://github.com/nakabonne/golangci-lint into nakabonne-nestif 2020-04-23 00:31:25 +03:00
tdakkota
92aa97e55e feat: add asciicheck linter support 2020-04-22 19:55:05 +03:00
Marat Reymers
9914737fc3 Add linter testpackage 2020-04-22 18:57:30 +03:00
Ryan Currah
990b43f19a
Merge remote-tracking branch 'golangci/master' into add-gomodguard-linter 2020-04-21 20:17:09 -04:00
nakabonne
0108387c24 Add nestif linter 2020-04-22 08:51:43 +09:00
Ryan Currah
6bb04d5ac0
use correct url, update gomodguard 2020-04-10 18:39:44 -04:00
Ryan Currah
020b9e7103
added new linter gomodguard, disabled by default 2020-04-04 15:29:11 -04:00
Hiroki Suezawa
dfb22785dc Upgrade gosec 2020-03-22 06:21:46 +09:00
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