mirror of
https://github.com/mgechev/revive.git
synced 2025-11-25 22:12:38 +02:00
Fix formatter and output
This commit is contained in:
@@ -147,7 +147,11 @@ func getFiles() []string {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
matches = append(matches, m...)
|
for _, f := range m {
|
||||||
|
if strings.HasSuffix(f, ".go") {
|
||||||
|
matches = append(matches, f)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if excludeGlobs == "" {
|
if excludeGlobs == "" {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ func (f *Default) Name() string {
|
|||||||
// Format formats the failures gotten from the lint.
|
// Format formats the failures gotten from the lint.
|
||||||
func (f *Default) Format(failures <-chan lint.Failure, config lint.RulesConfig) (string, error) {
|
func (f *Default) Format(failures <-chan lint.Failure, config lint.RulesConfig) (string, error) {
|
||||||
for failure := range failures {
|
for failure := range failures {
|
||||||
fmt.Printf("%v%v: %s\n", failure.GetFilename(), failure.Position.Start, failure.Failure)
|
fmt.Printf("%v: %s\n", failure.Position.Start, failure.Failure)
|
||||||
}
|
}
|
||||||
return "", nil
|
return "", nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user