Improve 'no such linter' error message (#1244)

This commit is contained in:
Denis Tingaikin 2020-07-17 13:48:05 +07:00 committed by GitHub
parent 862ed88cf0
commit 21ee78cf62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,7 +22,7 @@ func (v Validator) validateLintersNames(cfg *config.Linters) error {
allNames = append(allNames, cfg.Disable...)
for _, name := range allNames {
if v.m.GetLinterConfigs(name) == nil {
return fmt.Errorf("no such linter %q", name)
return fmt.Errorf("no such linter %v, run 'golangci-lint linters' to see the list of supported linters", name)
}
}