1
0
mirror of https://github.com/mgechev/revive.git synced 2024-11-28 08:49:11 +02:00
revive/test/superfluous-else_test.go
2023-09-24 08:44:02 +02:00

16 lines
411 B
Go

package test
import (
"testing"
"github.com/mgechev/revive/internal/ifelse"
"github.com/mgechev/revive/lint"
"github.com/mgechev/revive/rule"
)
// TestSuperfluousElse rule.
func TestSuperfluousElse(t *testing.T) {
testRule(t, "superfluous-else", &rule.SuperfluousElseRule{})
testRule(t, "superfluous-else-scope", &rule.SuperfluousElseRule{}, &lint.RuleConfig{Arguments: []any{ifelse.PreserveScope}})
}