-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
area: configRelated to .golangci.yml and/or cli optionsRelated to .golangci.yml and/or cli optionsenhancementNew feature or improvementNew feature or improvement
Description
Enabling or disabling go vet plug-ins would be very cool.
Seems like implementation is pretty straight-forward:
golangci-lint/pkg/golinters/govet.go
Lines 36 to 61 in c9a9255
| func NewGovet(cfg *config.GovetSettings) *goanalysis.Linter { | |
| analyzers := []*analysis.Analyzer{ | |
| // the traditional vet suite: | |
| asmdecl.Analyzer, | |
| assign.Analyzer, | |
| atomic.Analyzer, | |
| bools.Analyzer, | |
| buildtag.Analyzer, | |
| cgocall.Analyzer, | |
| composite.Analyzer, | |
| copylock.Analyzer, | |
| errorsas.Analyzer, | |
| httpresponse.Analyzer, | |
| loopclosure.Analyzer, | |
| lostcancel.Analyzer, | |
| nilfunc.Analyzer, | |
| printf.Analyzer, | |
| shift.Analyzer, | |
| stdmethods.Analyzer, | |
| structtag.Analyzer, | |
| tests.Analyzer, | |
| unmarshal.Analyzer, | |
| unreachable.Analyzer, | |
| unsafeptr.Analyzer, | |
| unusedresult.Analyzer, | |
| } |
We can filter analyzers in NewGovet function, but I'm not sure about config.
I think that there should be something like we have for linters section:
linters:
enable:
- megacheck
- govet
enable-all: false
disable:
- maligned
- prealloc
disable-all: falseBut in linters-settings.govet.
Rel: #446
Metadata
Metadata
Assignees
Labels
area: configRelated to .golangci.yml and/or cli optionsRelated to .golangci.yml and/or cli optionsenhancementNew feature or improvementNew feature or improvement