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

21 lines
469 B
Go
Raw Normal View History

2024-04-20 10:20:56 +02:00
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{
2024-04-20 10:20:56 +02:00
Arguments: []any{int64(60)},
})
testRule(t, "comments_density_2", &rule.CommentsDensityRule{}, &lint.RuleConfig{
2024-04-20 10:20:56 +02:00
Arguments: []any{int64(90)},
})
testRule(t, "comments_density_3", &rule.CommentsDensityRule{}, &lint.RuleConfig{})
2024-04-20 10:20:56 +02:00
}