From 5939a81c8a6701aa8afa17a5169897945dee337f Mon Sep 17 00:00:00 2001 From: chavacava Date: Fri, 8 May 2020 22:43:14 +0200 Subject: [PATCH] removes unused code --- rule/identical-branches.go | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/rule/identical-branches.go b/rule/identical-branches.go index 4307efc..094a791 100644 --- a/rule/identical-branches.go +++ b/rule/identical-branches.go @@ -2,7 +2,6 @@ package rule import ( "go/ast" - "reflect" "github.com/mgechev/revive/lint" ) @@ -73,21 +72,6 @@ func (w *lintIdenticalBranches) identicalBranches(branches []*ast.BlockStmt) boo return true } -func (w *lintIdenticalBranches) identicalBranches2(branches []*ast.BlockStmt) bool { - if len(branches) < 2 { - return false - } - - ref := branches[0] - for i := 1; i < len(branches); i++ { - if !reflect.DeepEqual(branches[i], ref) { - return false - } - } - - return true -} - func (w lintIdenticalBranches) newFailure(node ast.Node, msg string) { w.onFailure(lint.Failure{ Confidence: 1,