diff --git a/rule/superfluous-else.go b/rule/superfluous-else.go index 977d81a..a46ddd4 100644 --- a/rule/superfluous-else.go +++ b/rule/superfluous-else.go @@ -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" } diff --git a/test/superfluous-else_test.go b/test/superfluous-else_test.go index a352408..ab68b30 100644 --- a/test/superfluous-else_test.go +++ b/test/superfluous-else_test.go @@ -8,5 +8,5 @@ import ( // TestSuperfluousElse rule. func TestSuperfluousElse(t *testing.T) { - testRule(t, "superfluous-else", &rule.SuperfluousElse{}) + testRule(t, "superfluous-else", &rule.SuperfluousElseRule{}) }