142 Commits

Author SHA1 Message Date
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
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
Sergey Vilgelm
a35fd6e91a
Support short and json formats for version cmd (#1315) 2020-08-20 08:57:41 -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
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
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
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
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