mirror of
https://github.com/mgechev/revive.git
synced 2024-11-28 08:49:11 +02:00
11 lines
289 B
Go
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
|
||
|
}
|