bySeverity returns all messages with given severity
(issues []*lint.Issue)
| 75 | |
| 76 | // bySeverity returns all messages with given severity |
| 77 | func (f *DefaultFormatter) bySeverity(issues []*lint.Issue) (errs, warns, others []*lint.Issue) { |
| 78 | for _, r := range issues { |
| 79 | switch r.Severity() { |
| 80 | case lint.SeverityError: |
| 81 | errs = append(errs, r) |
| 82 | case lint.SeverityWarn: |
| 83 | warns = append(warns, r) |
| 84 | default: |
| 85 | others = append(others, r) |
| 86 | } |
| 87 | } |
| 88 | return errs, warns, others |
| 89 | } |
| 90 | |
| 91 | func truncate(maxSize int, input string) string { |
| 92 | if len(input) < maxSize { |