1
0
mirror of https://github.com/mgechev/revive.git synced 2025-11-27 22:18:41 +02:00

feature: new rules identical-switch-branches and identical-ifelseif-branches

These new rules result from the refactoring of `identical-branches` that will cover only simple/single if..else statements.
This commit is contained in:
chavacava
2025-08-06 11:19:12 +02:00
committed by GitHub
parent f353e4b0e5
commit 47205455ea
11 changed files with 497 additions and 348 deletions

View File

@@ -0,0 +1,11 @@
package test
import (
"testing"
"github.com/mgechev/revive/rule"
)
func TestIdenticalSwitchBranches(t *testing.T) {
testRule(t, "identical_switch_branches", &rule.IdenticalSwitchBranchesRule{})
}