mirror of
https://github.com/mgechev/revive.git
synced 2025-03-19 21:07:46 +02:00
* added comment-spacing rule for revive * added test for comment-spacings rule * adds comment-spacings rule to the configuration * renames the source file to match rule name * adds some tests * refactor Comment-Spacings Rule to remove whiteList and avoid Panic at empty comment * refactoring and adds rule configuration * adds rule documentation Co-authored-by: chavacava <salvadorcavadini+github@gmail.com>
16 lines
280 B
Go
16 lines
280 B
Go
package test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/mgechev/revive/lint"
|
|
"github.com/mgechev/revive/rule"
|
|
)
|
|
|
|
func TestCommentSpacings(t *testing.T) {
|
|
|
|
testRule(t, "comment-spacings", &rule.CommentSpacingsRule{}, &lint.RuleConfig{
|
|
Arguments: []interface{}{"myOwnDirective"}},
|
|
)
|
|
}
|