137 Commits

Author SHA1 Message Date
SystemGlitch
029278c70a
Move sliceContains to new package pkg/sliceutil (#1333)
* Move sliceContains to new package pkg/sliceutil

* Test sliceutil
2020-08-24 06:56:54 -05:00
SystemGlitch
13c2a34028
Add home directory to config file search paths (#1325) 2020-08-24 16:44:33 +10:00
Sergey Vilgelm
a35fd6e91a
Support short and json formats for version cmd (#1315) 2020-08-20 08:57:41 -05:00
dependabot[bot]
6ac41d9f33
build(deps): bump github.com/go-critic/go-critic from 0.5.0 to 0.5.2 (#1307)
* build(deps): bump github.com/go-critic/go-critic from 0.5.0 to 0.5.2

Bumps [github.com/go-critic/go-critic](https://github.com/go-critic/go-critic) from 0.5.0 to 0.5.2.
- [Release notes](https://github.com/go-critic/go-critic/releases)
- [Commits](https://github.com/go-critic/go-critic/compare/v0.5.0...v0.5.2)

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

* Fix gocritic TestFilterByDisableTags

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sergey Vilgelm <sergey.vilgelm@ibm.com>
2020-08-17 08:38:53 -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
Oleg Butuzov
6e7c317610
Sorting result.Issues implementation (golangci/golangci-lint#1217) (#1218) 2020-07-12 16:35:08 -05: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
Joe Wilner
6550984878
Configure path prefix via processor abstraction (#1226) 2020-07-11 09:14:52 +10: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
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
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
Collin Kreklow
3c2aa58dc5
Add *println to exception EXC0001 (#1074)
Exception EXC0001 ignores errors on functions like Sprint and Sprintf,
but not Sprintln. Update the exception to include *println as well.
2020-05-09 15:18:17 +03:00
Isaev Denis
cb58d1f82e
speed up CI and golangci-lint (#1070)
Run CI on mac os only with go1.13 and on windows only on go1.14.
Speed up tests. Introduce --allow-parallel-runners.
Block on parallel run lock 5s instead of 60s.
Don't invalidate analysis cache for minor config changes.
2020-05-09 15:15:34 +03:00
Andrew Shannon Brown
ef44e11e17
Merge branch 'master' into asb/nolintlint-internal 2020-04-29 15:27:35 -07: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
Andrew Shannon Brown
909f628d75 Add linter for nolint
Linter can check that nolint statements are properly formatted and also that all
nolint statements are used.
2020-04-26 20:20:17 -07:00
John Starich
36d8d881f9 Preserve API backward compatibility 2020-04-25 14:14:42 -05:00
John Starich
c55e7614d4 Re-enable default excludes by ID 2020-04-25 13:57:57 -05:00
Aleksandr Razumov
e2b927f029
Merge pull request #1036 from iwankgb/exclude-case-sensitive
Adding case-sensitive exclude processor
2020-04-24 12:48:42 +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
Aleksandr Razumov
48361b9978
Merge pull request #852 from maratori/add-testpackage
Add linter testpackage
2020-04-23 00:17:33 +03:00
Aleksandr Razumov
aed4806aae
Merge pull request #1029 from kaka19ace/master
feat: [gocritic] support disabled-tags
2020-04-23 00:15:06 +03:00
Maciej "Iwan" Iwanowski
a68b411e4a
Adding case-sensitive exclude processor
Signed-off-by: Maciej "Iwan" Iwanowski <maciej.iwanowski@critical.today>
2020-04-22 18:40:10 +02:00
Marat Reymers
9914737fc3 Add linter testpackage 2020-04-22 18:57:30 +03:00
kaka_ace
00cc2336c7 feat: [gocritic] support disabled-tags 2020-04-22 12:11:56 +08: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
Aleksandr Razumov
3fd6db779e
Merge pull request #1017 from viktorasm/add-github-output-format
Adding github actions output format
2020-04-22 02:04:11 +03:00
Viktoras Makauskas
d7222c7d38 Adding github actions output format 2020-04-10 23:46:19 +03: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
4a2147930a
Update wsl to v3.0.0
* Support to force cuddle with error checking
* Support to separate leading comments with empty lines
2020-03-15 13:36:57 +01:00
Martins Irbe
42f2ad8a29 gocritic: update disabled check warning message 2020-02-03 16:38:27 +01:00
Isaev Denis
6237e59c97
dev: use goprintffuncname, gomnd and rowserrcheck (#927)
Order linters in config in alphabetical order.
Support gomnd configuration.
2020-01-19 19:55:29 +03:00
to6ka
d137c2e18c make uniq by line configurable (#920) 2020-01-19 16:49:46 +03: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
David Braley
be3c688da4 I473 (#841)
Support custom linters integration by plugins

Co-authored-by: Isaev Denis <idenx@yandex.com>
2020-01-08 13:51:55 +03: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
Denis Titusov
0cc87df732 Rename deadline option to timeout and mark deadline as deprecated. (#793) 2019-10-08 09:37:54 +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
Denis Isaev
50cfc343c5 gocognit: fix default threshold from 0 to 30 2019-10-04 11:06:16 -04:00
NiseVoid
fbbd24575f Update whitespace to v0.0.4 (#786) 2019-10-04 15:12:07 +03:00
Trevor Pounds
fd997edeeb Cleanup nolint directives. (#779) 2019-10-03 19:34:19 +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