1
0
mirror of https://github.com/mgechev/revive.git synced 2024-11-28 08:49:11 +02:00
revive/formatter/severity.go

11 lines
289 B
Go
Raw Normal View History

2018-05-26 22:47:13 +02:00
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
}