1
0
mirror of https://github.com/mgechev/revive.git synced 2025-12-05 22:53:41 +02:00

Adds new rule empty-block (#14)

* Adds rule superfluous-else (an extension of indent-error-flow)

* initial (non functional) version

* empty-block working version

* adds tests for empty-block rule

* Adds empty-block to the rules table

* code clean-up
This commit is contained in:
chavacava
2018-06-08 21:41:49 +02:00
committed by Minko Gechev
parent dc6767b811
commit 1fa5046357
6 changed files with 100 additions and 0 deletions

12
test/empty-block_test.go Normal file
View File

@@ -0,0 +1,12 @@
package test
import (
"testing"
"github.com/mgechev/revive/rule"
)
// TestEmptyBlock rule.
func TestEmptyBlock(t *testing.T) {
testRule(t, "empty-block", &rule.EmptyBlockRule{})
}