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:
parent
ee3547ea90
commit
336f3e0750
@ -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"
|
||||
}
|
||||
|
||||
|
@ -8,5 +8,5 @@ import (
|
||||
|
||||
// TestSuperfluousElse rule.
|
||||
func TestSuperfluousElse(t *testing.T) {
|
||||
testRule(t, "superfluous-else", &rule.SuperfluousElse{})
|
||||
testRule(t, "superfluous-else", &rule.SuperfluousElseRule{})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user