tests: integrate "github.com/mgechev/revive" to fmt tests

https://github.com/mgechev/revive

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
Gyuho Lee
2018-07-21 15:32:28 -07:00
parent 104b6a3424
commit 1c04820026
3 changed files with 52 additions and 0 deletions

38
tests/revive.toml Normal file
View File

@@ -0,0 +1,38 @@
ignoreGeneratedHeader = false
severity = "warning"
confidence = 0.8
errorCode = 0
warningCode = 0
[rule.blank-imports]
[rule.context-as-argument]
[rule.dot-imports]
[rule.error-return]
[rule.error-naming]
[rule.if-return]
[rule.increment-decrement]
[rule.var-declaration]
[rule.package-comments]
[rule.range]
[rule.receiver-naming]
[rule.time-naming]
[rule.indent-error-flow]
[rule.errorf]
# TODO: enable following
# grpcproxy context.WithValue(ctx, rpctypes.TokenFieldNameGRPC, token)
# [rule.context-keys-type]
# punctuation in error value
# [rule.error-strings]
# underscore variables
# [rule.var-naming]
# godoc
# [rule.exported]
# return unexported type
# [rule.unexported-return]