Merge pull request #958 from martinsirbe/update-warn-msg

gocritic: update disabled check warning message
This commit is contained in:
Aleksandr Razumov 2020-02-03 20:40:33 +03:00 committed by GitHub
commit 4d165fc2dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -139,8 +139,8 @@ func (s *GocriticSettings) InferEnabledChecks(log logutils.Log) {
enabledChecksSet := stringsSliceToSet(enabledChecks)
for _, disabledCheck := range s.DisabledChecks {
if !enabledChecksSet[disabledCheck] {
log.Warnf("Gocritic check %q was disabled by config, was it's not enabled, no need to disable it",
disabledCheck)
log.Warnf("Gocritic check %q was explicitly disabled via config. However, as this check"+
"is disabled by default, there is no need to explicitly disable it via config.", disabledCheck)
continue
}
delete(enabledChecksSet, disabledCheck)