1
0
mirror of https://github.com/mgechev/revive.git synced 2024-11-28 08:49:11 +02:00

Update main.go

This commit is contained in:
mgechev 2018-01-25 11:47:39 -08:00
parent 3c3a6b538d
commit faa19bd4c1

19
main.go
View File

@ -11,26 +11,25 @@ import (
func main() {
src := `
package p
package p
func Test() {
if true {
return 42;
} else {
return 23;
}
func Test() {
if true {
return 42;
} else {
return 23;
}
}
func foo_bar(a int, b int, c int, d int) {
return a + b + c;
}
`
}`
revive := lint.New(func(file string) ([]byte, error) {
return []byte(src), nil
})
var result []lint.Rule
result = append(result, &rule.LintElseRule{}, &rule.ArgumentsLimitRule{}, &rule.NamesRule{})
result = append(result, &rule.ElseRule{}, &rule.ArgumentsLimitRule{}, &rule.NamesRule{})
var config = lint.RulesConfig{
"argument-limit": lint.RuleConfig{