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

Fix superfluous-else rule struct namming.

This commit is contained in:
Salvador Cavadini 2018-06-07 13:54:43 +02:00
parent ee3547ea90
commit 336f3e0750
2 changed files with 5 additions and 5 deletions

View File

@ -7,11 +7,11 @@ import (
"github.com/mgechev/revive/lint"
)
// SuperfluousElse lints given else constructs.
type SuperfluousElse struct{}
// SuperfluousElseRule lints given else constructs.
type SuperfluousElseRule struct{}
// Apply applies the rule to given file.
func (r *SuperfluousElse) Apply(file *lint.File, arguments lint.Arguments) []lint.Failure {
func (r *SuperfluousElseRule) Apply(file *lint.File, arguments lint.Arguments) []lint.Failure {
var failures []lint.Failure
onFailure := func(failure lint.Failure) {
@ -24,7 +24,7 @@ func (r *SuperfluousElse) Apply(file *lint.File, arguments lint.Arguments) []lin
}
// Name returns the rule name.
func (r *SuperfluousElse) Name() string {
func (r *SuperfluousElseRule) Name() string {
return "superfluous-else"
}

View File

@ -8,5 +8,5 @@ import (
// TestSuperfluousElse rule.
func TestSuperfluousElse(t *testing.T) {
testRule(t, "superfluous-else", &rule.SuperfluousElse{})
testRule(t, "superfluous-else", &rule.SuperfluousElseRule{})
}