mirror of
https://github.com/mgechev/revive.git
synced 2024-11-24 08:32:22 +02:00
Add test case for function-result-limit
rule, and updated README
This commit is contained in:
parent
0c243f004c
commit
dd1a8bf4e6
@ -269,7 +269,7 @@ List of all available rules. The rules ported from `golint` are left unchanged a
|
||||
| `constant-logical-expr` | n/a | Warns on constant logical expressions | no | no |
|
||||
| `bool-literal-in-expr`| n/a | Suggests removing Boolean literals from logic expressions | no | no |
|
||||
| `redefines-builtin-id`| n/a | Warns on redefinitions of builtin identifiers | no | no |
|
||||
| `function-result-limit` | int | Specifies the maximum number of arguments a function can return | no | no |
|
||||
| `function-result-limit` | int | Specifies the maximum number of results a function can return | no | no |
|
||||
|
||||
## Available Formatters
|
||||
|
||||
|
14
test/function-result-limit_test.go
Normal file
14
test/function-result-limit_test.go
Normal file
@ -0,0 +1,14 @@
|
||||
package test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/mgechev/revive/lint"
|
||||
"github.com/mgechev/revive/rule"
|
||||
)
|
||||
|
||||
func TestFunctionResultsLimit(t *testing.T) {
|
||||
testRule(t, "function-result-limit", &rule.FunctionResultsLimitRule{}, &lint.RuleConfig{
|
||||
Arguments: []interface{}{int64(3)},
|
||||
})
|
||||
}
|
Loading…
Reference in New Issue
Block a user