2017-08-29 10:47:29 -07:00
|
|
|
package formatter
|
2017-07-04 20:04:23 +03:00
|
|
|
|
2017-08-29 10:47:29 -07:00
|
|
|
import "github.com/mgechev/revive/rule"
|
2017-07-04 20:04:23 +03:00
|
|
|
|
2017-08-27 16:57:16 -07:00
|
|
|
// FormatterMetadata configuration of a formatter
|
2017-07-04 20:04:23 +03:00
|
|
|
type FormatterMetadata struct {
|
|
|
|
Name string
|
|
|
|
Description string
|
|
|
|
Sample string
|
|
|
|
}
|
|
|
|
|
2017-08-27 16:57:16 -07:00
|
|
|
// Formatter defines an interface for failure formatters
|
2017-07-04 20:04:23 +03:00
|
|
|
type Formatter interface {
|
2017-08-29 10:47:29 -07:00
|
|
|
Format([]rule.Failure) string
|
2017-07-04 20:04:23 +03:00
|
|
|
}
|