1
0
mirror of https://github.com/mgechev/revive.git synced 2025-11-23 22:04:49 +02:00

test: add default case when no arguments provided to a rule (#1140)

This commit is contained in:
Oleksandr Redko
2024-11-20 21:19:17 +02:00
committed by GitHub
parent 0e8acea6ce
commit 19834d40a4
24 changed files with 571 additions and 6 deletions

View File

@@ -7,6 +7,10 @@ import (
"github.com/mgechev/revive/rule"
)
func TestFuncLengthDefault(t *testing.T) {
testRule(t, "function_length_default", &rule.FunctionLength{}, &lint.RuleConfig{})
}
func TestFuncLengthLimitsStatements(t *testing.T) {
testRule(t, "function_length1", &rule.FunctionLength{}, &lint.RuleConfig{
Arguments: []any{int64(2), int64(100)},