1
0
mirror of https://github.com/mgechev/revive.git synced 2024-11-21 17:16:40 +02:00
revive/test/comments_density_test.go
2024-11-11 19:31:18 +01: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{})
}