1
0
mirror of https://github.com/mgechev/revive.git synced 2025-07-13 01:00:17 +02:00

Implement command line arguments

This commit is contained in:
mgechev
2018-01-27 16:22:17 -08:00
parent a227153bc2
commit 8746067321
8 changed files with 218 additions and 106 deletions

View File

@ -20,6 +20,11 @@ type CLIFormatter struct {
Metadata lint.FormatterMetadata
}
// Name returns the name of the formatter
func (f *CLIFormatter) Name() string {
return "cli"
}
func formatFailure(failure lint.Failure, severity lint.Severity) []string {
fString := color.BlueString(failure.Failure)
fName := color.RedString(failure.RuleName)