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
Ludovic Fernandez
1b30a171ce
fix: wrong load mode ( #1733 )
...
* fix: asciicheck
* fix: exportloopref
* fix: exhaustivestruct
* fix: makezero
2021-02-14 12:11:38 -06:00
Ludovic Fernandez
b0b2dc6b36
feat: add durationcheck linter. ( #1734 )
...
Co-authored-by: Sergey Vilgelm <sergey.vilgelm@ibm.com>
2021-02-14 11:47:06 -06:00
Sebastian Spaink
35b6f35476
Add "revive" linter ( #1729 )
2021-02-14 14:36:37 +01:00
Ludovic Fernandez
60455b502b
fix: add missing ifshort configuration. ( #1672 )
2021-02-01 23:13:53 +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
Dudás Ádám
df9278efd2
resolve custom linters' path relative to config file directory ( #1572 )
...
Resolves golangci/golangci-lint#1085
2020-12-27 02:02:25 +03:00
Andrew Shannon Brown
222076fdc6
Add forbidigo linter ( #1569 )
2020-12-24 17:19:32 +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
Kunwardeep
b90551cdf9
add new paralleltest linter ( #1503 )
Extra / Vulnerability scanner (push) Failing after 15m24s
CI / go-mod (push) Failing after 15m22s
CI / golangci-lint (push) Failing after 15m20s
Release a tag / release (push) Failing after 15m18s
CI / tests-on-windows (push) Has been cancelled
CI / tests-on-macos (push) Has been cancelled
CI / tests-on-unix (1.13) (push) Has been cancelled
CI / tests-on-unix (1.14) (push) Has been cancelled
CI / tests-on-unix (1.15) (push) Has been cancelled
CI / check_generated (push) Has been cancelled
Release a tag / docker-release (map[Dockerfile:build/Dockerfile.alpine]) (push) Has been cancelled
Release a tag / docker-release (map[Dockerfile:build/Dockerfile]) (push) Has been cancelled
2020-11-22 22:28:38 +03:00
Mateusz Gozdek
9ff0f31ed7
pkg/lint/lintersdb: report all unknown linters at once ( #1477 )
...
Otherwise, if one configures multiple invalid linters, or jumps between
the versions, it is annoying to get same error with different value N
times.
Signed-off-by: Mateusz Gozdek <mgozdekof@gmail.com>
2020-11-01 20:31:15 +00:00
Mateusz Bilski
c57627b18c
Add exhaustivestruct linter ( #1411 )
...
* Add exhaustivestruct linter
* CHange load mode to types info
* Fix go.mod
2020-10-12 08:35:02 +02:00
Vladimir Evgrafov
796a958805
Add go-errorlint ( #1420 )
...
* Add errorlint
* Add errorlint config example
2020-10-09 15:42:48 +03:00
Tom Arrell
247b6c2796
Add wrapcheck linter ( #1407 )
...
* Add failing test
* Add wrapcheck linter
2020-10-06 13:40:00 +02:00
Melvin
926e76dcf2
Add tparallel linter ( #1380 )
2020-10-02 13:00:46 -07: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
Sergey Vilgelm
3aa04f5b62
Add WithAutofix flag for gofumpt linter config ( #1281 )
2020-08-02 15:09:50 -05:00
Xiang Dai
d38d047528
Gci: support auto fix ( #1277 )
...
Signed-off-by: Xiang Dai <long0dai@foxmail.com>
2020-07-31 08:39:08 +08: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
Denis Tingaikin
21ee78cf62
Improve 'no such linter' error message ( #1244 )
2020-07-17 06:48:05 +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
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
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
Tam Mach
dc260be693
Add exportloopref linter ( #1163 )
2020-05-24 10:31:32 +03:00
Andrew Shannon Brown
90a8cd41bd
Fix up nolintlint comments and urls ( #1164 )
2020-05-24 10:08:14 +03:00
Denis Krivak
7c2871c596
godot: add autofix mode
2020-05-18 15:49:58 +03:00
Isaev Denis
6b124f1a0e
fix goerr13 dependencies ( #1089 )
2020-05-13 21:22:52 +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
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
Andrew Shannon Brown
ef44e11e17
Merge branch 'master' into asb/nolintlint-internal
2020-04-29 15:27:35 -07:00
tdakkota
0d95fafefc
feat: add go-err113 linter support
2020-04-27 21:37:34 +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
Aleksandr Razumov
1373897abf
Merge branch 'tdakkota-feature/add-asciicheck-support'
2020-04-25 17:51:53 +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
4292963937
do not error out when go.mod is missing just raise warning, change linter options
2020-04-05 17:49:27 -04:00
Ryan Currah
020b9e7103
added new linter gomodguard, disabled by default
2020-04-04 15:29:11 -04:00
Denis Krivak
58572c7789
Add new linter: godot
2020-03-16 11:56:57 +03:00
Trevor Pounds
45f1e48f3d
Fix rowserrcheck URL.
...
Fixes #932
2020-01-21 21:39:11 -05: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