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
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
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
Sergey Vilgelm
c8bd9549a5
Support --fix for gofumpt ( #1239 )
2020-07-18 21:33:47 -05:00
Denis Tingaikin
21ee78cf62
Improve 'no such linter' error message ( #1244 )
2020-07-17 06:48:05 +00:00
Oleg Butuzov
6e7c317610
Sorting result.Issues implementation (golangci/golangci-lint#1217) ( #1218 )
2020-07-12 16:35:08 -05:00
dependabot-preview[bot]
65e1b30ebd
build(deps): bump github.com/kyoh86/exportloopref from 0.1.4 to 0.1.7 ( #1214 )
...
* build(deps): bump github.com/kyoh86/exportloopref from 0.1.4 to 0.1.7
Bumps [github.com/kyoh86/exportloopref](https://github.com/kyoh86/exportloopref ) from 0.1.4 to 0.1.7.
- [Release notes](https://github.com/kyoh86/exportloopref/releases )
- [Changelog](https://github.com/kyoh86/exportloopref/blob/master/.goreleaser.yml )
- [Commits](https://github.com/kyoh86/exportloopref/compare/v0.1.4...v0.1.7 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
* Fix exportloopref linter
Change the WithLoadMode to use LoadModeTypesInfo isntead of LoadModeSyntax
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Sergey Vilgelm <sergey.vilgelm@ibm.com>
2020-07-12 21:41:06 +02: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
sonata
b98fda6f34
Enable linters for golangci-lint ( #1221 )
...
* Enable linters for golangci-lint
* Remove unused nolint
* Fix lint
2020-07-10 10:50:06 +09:00
Denis Tingaikin
dfa0013583
Fix: goheader linter can throw nil pointer exception in case of a source file has not issues ( #1209 )
...
* fix potential nil pointer exception
Signed-off-by: denis-tingajkin <denis.tingajkin@xored.com>
* add test to cover
Signed-off-by: denis-tingajkin <denis.tingajkin@xored.com>
2020-07-05 15:32:00 +07:00
iwankgb
306cbb0e6e
Upgrading to go-critic v0.5.0 ( #1205 )
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
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
Duco van Amstel
5f0de2982b
Protect NewFilenameUnadjuster from concurrent map writes ( #1192 )
2020-06-25 14:57:49 +02: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
Soichiro Kashima
71b2f04e88
handle some block comment to detect generated files ( #1161 )
2020-05-25 19:36: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
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
Isaev Denis
3c46e160de
fix invalid error message "no go files to analyze" ( #1154 )
...
In case of timeouts of go/packages loading
we could return such error.
Relates: #825
2020-05-19 09:55:25 +03:00
Denis Krivak
7c2871c596
godot: add autofix mode
2020-05-18 15:49:58 +03: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
Isaev Denis
6b124f1a0e
fix goerr13 dependencies ( #1089 )
2020-05-13 21:22:52 +03:00
Denis Krivak
d7648bf202
godot: fix issue with --fix
flag
2020-05-13 11:39:08 +03:00
☃ Elliot Shepherd
c88df8f473
Fix nil pointer in codeclimate.go ( #1077 )
...
Some issues don't have any source lines
2020-05-11 22:10:39 +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