1
0
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:
xuri 2018-09-17 18:50:04 +08:00
parent 0c243f004c
commit dd1a8bf4e6
No known key found for this signature in database
GPG Key ID: BA5E5BB1C948EDF7
2 changed files with 15 additions and 1 deletions

View File

@ -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

View 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)},
})
}