441 Commits

Author SHA1 Message Date
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
Aleksey Bakin
cc152be1a9
bump thelper linter version to v0.3.0 (#1696) 2021-02-07 18:28:04 +01:00
James Lucktaylor
000a815656
fix(cmd/linters): truncate multiline descriptions (#1663) 2021-02-07 04:35:31 +01:00
Robert Liebowitz
2a5b42cecc
prealloc: Use upstream version (#1694) 2021-02-06 14:17:25 +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
Sebastien Rosset
443e5b6c73
Print error message and exit with non-zero status when ruleguard parse error occurs (#1666) 2021-02-01 12:50:25 +01:00
Denis Krivak
89367aee22
Add "exclude" option for godot linter (#1669) 2021-01-29 15:23:12 +01:00
Ludovic Fernandez
6c25d06830
fix: bump github.com/tommy-muehle/go-mnd/v2 to v2.3.1 (#1667)
Some checks failed
Extra / Vulnerability scanner (push) Failing after 1m43s
CI / golangci-lint (push) Failing after 2m38s
CI / tests-on-windows (push) Has been skipped
CI / tests-on-macos (push) Has been skipped
CI / tests-on-unix (1.13) (push) Has been skipped
CI / tests-on-unix (1.14) (push) Has been skipped
CI / tests-on-unix (1.15) (push) Has been skipped
CI / check_generated (push) Has been skipped
CI / go-mod (push) Failing after 17m1s
Release a tag / release (push) Failing after 15m25s
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
2021-01-26 11:43:15 +01:00
Eugene Simonov
750309d157
Add ifshort linter (#1587) 2021-01-20 23:07:43 +01:00
Andrew Shannon Brown
ec46f42e01
Verify linter name in integration tests (#1595) 2021-01-15 21:37:56 +01:00
Ludovic Fernandez
1e5ba1eb70
fix: modules-download-mode support (#1593)
Some checks failed
Extra / Vulnerability scanner (push) Failing after 2m2s
CI / go-mod (push) Failing after 17m24s
CI / golangci-lint (push) Failing after 17m22s
Release a tag / release (push) Failing after 17m20s
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
2021-01-07 23:37:22 +01:00
Nishanth Shanmugham
76c452197b
add 'predeclared' linter (#1606) 2021-01-07 17:58:04 +01:00
dependabot[bot]
122193999a
build(deps): bump github.com/kulti/thelper from 0.1.0 to 0.2.0 (#1630) 2021-01-05 05:09:01 +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
750b4babc7
Fix forbidigo linter name in reports (#1590)
Fix cut-and-paste error with linter name.

Fixes #1589
2020-12-28 10:55:38 -08:00
Andrew Shannon Brown
306816ec85
Revert "Update nolintlint to fix nolint formatting and remove unused nolint statements (#1573)" (#1584)
This reverts commit aeb98303293570ba682ea933a4e9501a11a3aa99.

There are some cases that nolinter fixer wasn't handling properly or expectedly (#1579, #1580, #1581) so we'll fix those in a new attempt.
2020-12-27 11:49:58 -08:00
Denis Tingaikin
85049e5ea0
Bump go-header to v0.4.1 (#1578) 2020-12-27 20:32:33 +01:00
Andrew Shannon Brown
aeb9830329
Update nolintlint to fix nolint formatting and remove unused nolint statements (#1573)
Also allow multiple ranges to satisfy a nolint statement as having been used.
2020-12-27 06:18:02 -08: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
Ludovic Fernandez
be0297933a
fix: nolintlint comment analysis. (#1571) 2020-12-22 01:24:28 +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
iwankgb
d32798769c
Cobra.Command.SetOutput is depracated (#1554) 2020-12-13 00:01:31 +00:00
iwankgb
164cfab820
Removing reference to no-longer-existing linter-in-the-cloud (#1553) 2020-12-12 21:59:15 +00:00
Ludovic Fernandez
b79e0c5adf
fix: throw an error on panic. (#1540)
* fix: throw an error on panic.
* current min go version is go1.13
2020-12-12 20:31:17 +00:00
Dan Kortschak
33fe87b2a5
result/processors: treat all non-Go source as special autogenerated files
Prior to this change golangci-lint would attempt to follow //line
directives into generation description files unless they were in a small
set of fake files used by goyacc. Now we consider all non-Go source as
special.
2020-12-11 17:07:28 +10:30
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)
Some checks failed
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
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
iwankgb
947dae101e
Unknown linter breaks //nolint (#1497)
* Unknown linter breaks //nolint
* Testing if nolint directive for unknown linter silences violation on the same line
2020-11-09 08:33:24 +00: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
ac-rappi
9b3ba431f1
Added support for only specifying default severity (#1396) 2020-10-19 15:21:46 +11:00
Simon Sawert
a8b7b0037a
Update gochecknoglobals, use source analyzer (#1422) 2020-10-16 08:38:04 +11: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
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
Tam Mach
073e590a63
feat(completion): Add support for powershell completion (#1408)
This commit is to add support for powershell completion script.

Note: PowerShell v5.0+ is required
2020-10-10 19:11:00 +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
Tam Mach
5f93c930a1
Add support for fish completion (#1201)
Co-authored-by: Sascha Grunert <sgrunert@suse.com>
2020-09-21 07:50:06 +10:00
Xiang Dai
913e57fcda
Gci: update the way to call Run() (#1337)
Signed-off-by: Xiang Dai <long0dai@foxmail.com>
2020-08-31 08:38:05 +08: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