1
0
mirror of https://github.com/mgechev/revive.git synced 2024-11-28 08:49:11 +02:00
revive/test/comments-density_test.go
2024-04-20 10:20:56 +02:00

21 lines
469 B
Go

package test
import (
"testing"
"github.com/mgechev/revive/lint"
"github.com/mgechev/revive/rule"
)
func TestCommentsDensity(t *testing.T) {
testRule(t, "comments-density-1", &rule.CommentsDensityRule{}, &lint.RuleConfig{
Arguments: []any{int64(60)},
})
testRule(t, "comments-density-2", &rule.CommentsDensityRule{}, &lint.RuleConfig{
Arguments: []any{int64(90)},
})
testRule(t, "comments-density-3", &rule.CommentsDensityRule{}, &lint.RuleConfig{})
}