1
0
mirror of https://github.com/mgechev/revive.git synced 2025-01-10 03:17:11 +02:00
revive/formatter/severity.go
2018-05-26 13:47:16 -07:00

11 lines
289 B
Go

package formatter
import "github.com/mgechev/revive/lint"
func severity(config lint.RulesConfig, failure lint.Failure) lint.Severity {
if config, ok := config[failure.RuleName]; ok && config.Severity == lint.SeverityError {
return lint.SeverityError
}
return lint.SeverityWarning
}