172 Commits

Author SHA1 Message Date
Ludovic Fernandez
34ffdc243f
revive: convert hard coded excludes into default exclude patterns (#1938) 2021-05-01 18:40:56 +02:00
Tom Arrell
92fda268b2
Update Wrapcheck to v2, add configuration (#1947) 2021-05-01 00:13:51 +02:00
Ludovic Fernandez
12ed5facc9
staticcheck: configurable Go version. (#1946) 2021-04-30 22:28:50 +02:00
Ludovic Fernandez
8f3ad45e1c
gosec: add configuration (#1930) 2021-04-24 23:20:12 +02:00
Ludovic Fernandez
db80e16aba
dev: cleanup config package (#1929)
* split config section into files.
* extract anonymous types.
* sort linters alphabetically.
2021-04-24 16:29:04 +02:00
Simon Sawert
d6bcf9f4b2
Update wsl to 3.3.0, sort config in example config (#1922)
* Update wsl to 3.3.0, sort config in example config
* chore: ignore CVE-2020-26160
2021-04-21 19:18:09 +02:00
Ludovic Fernandez
9cb902cdf2
fix: comma in exclude pattern leads to unexpected results (#1917) 2021-04-19 15:20:49 +02:00
Ludovic Fernandez
93df6f75f5
Add tagliatelle linter (#1906) 2021-04-12 17:59:50 +02:00
Ben Ye
6844f6abf8
Add promlinter to lint metrics name (#1265) 2021-03-30 14:56:42 +02:00
Ludovic Fernandez
2ebc9d7202
dev: clean configuration and code (#1830) 2021-03-09 19:46:18 +01:00
Ludovic Fernandez
94d2d803d2
Add gomoddirectives linter. (#1817) 2021-03-09 18:59:06 +01:00
Sergey Vilgelm
05836e489b
Integrate ImportAs linter (#1783)
* Integrate ImportAs linter

* review: don't panic :)

Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
2021-02-26 13:08:49 -06:00
Sergey Vilgelm
251b205f54
Deprecate Interfacer linter (#1755) 2021-02-20 18:55:11 -06:00
Simon Sawert
b7aac3b1ad
Bump wsl to v3.2.0 (#1750) 2021-02-20 15:16:10 +01:00
Ludovic Fernandez
ea5f479087
exhaustivestruct: add missing settings (#1746) 2021-02-19 19:20:47 +01:00
Ludovic Fernandez
32e8517a34
cyclop: add missing settings (#1743) 2021-02-18 21:17:04 +01:00
Bartłomiej Klimczak
2121370f81
add 'cyclop' linter (#1738) 2021-02-17 09:48:29 +01:00
Sebastian Spaink
35b6f35476
Add "revive" linter (#1729) 2021-02-14 14:36:37 +01:00
Aleksey Bakin
cc152be1a9
bump thelper linter version to v0.3.0 (#1696) 2021-02-07 18:28:04 +01:00
Ludovic Fernandez
60455b502b
fix: add missing ifshort configuration. (#1672) 2021-02-01 23:13:53 +01:00
Andrew Shannon Brown
9e0c9f3929
Expose more config options for forbidigo (#1677) 2021-02-01 21:16:28 +01:00
Denis Krivak
89367aee22
Add "exclude" option for godot linter (#1669) 2021-01-29 15:23:12 +01:00
Eugene Simonov
750309d157
Add ifshort linter (#1587) 2021-01-20 23:07:43 +01:00
Nishanth Shanmugham
76c452197b
add 'predeclared' linter (#1606) 2021-01-07 17:58:04 +01:00
Sebastien Rosset
62710a8d97
Validate gocritic settings. Return error if settings includes a unsupported gocritic checker (#1563) 2021-01-04 18:20:40 +01:00
Andrew Shannon Brown
222076fdc6
Add forbidigo linter (#1569) 2020-12-24 17:19:32 +01:00
Ryan Currah
a893212f02
gomodguard: updated for new features and fixes (#1567) 2020-12-20 11:27:55 +01:00
Aleksey Bakin
0370d3adea
Add thelper linter (#1541) 2020-12-13 14:54:26 +01:00
Andrew Shannon Brown
cf32a7b706
Add makezero linter (#1520)
makezero ensures that objects recognized as slices are initialized with length 0.  By default, this is only required when we find a subsequent append to the object, but can also be enabled at all times as a way of discouraging the use of integer variables (i.e. "i") to index slices.
2020-12-05 07:37:37 -08:00
iwankgb
993337baa2
Using upstrem goconst (#1500)
github.com/golangci/goconst is now obsolete :)
2020-11-17 19:07:37 +00:00
ZhangYunHao
9948153575
DefaultExcludePatterns should only be used for specified linter (#1494)
Co-authored-by: zhangyunhao <zhangyunhao@bytedance.com>
2020-11-12 15:21:19 +01:00
Denis Krivak
df2e9e2ebd
Update godot to 1.3.0 (#1498) 2020-11-10 20:11:26 +03:00
nishanths
58234f055c
update exhaustive to latest; use version in go.mod (#1449)
* update exhaustive to latest

* wip

* update dep

* update flag name

* use versioned dep

* add tests

* unused file

* no need config file

* add vars to test

* test comment

* remove default settings
2020-10-14 08:19:06 +02:00
Vladimir Evgrafov
796a958805
Add go-errorlint (#1420)
* Add errorlint

* Add errorlint config example
2020-10-09 15:42:48 +03:00
Romanos
1a2a672644
Allow for serializing multiple golangci-lint invocations (#1302)
By default, golangci-lint fails after five seconds if another instance
is running. It is possible to disable that, but the discussion around
whether the cache is safe to use concurrently is not exactly full of
confidence. Add a flag that allows golangci-lint to wait forever
instead of failing.

see #1301
2020-08-28 14:06:28 +08:00
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