revive: enable var-naming rule (with exceptions)

Revive's var-naming rule will help us avoid adding future violations
of Go's standard naming convention (camelCase, etc.).
We make exceptions for "Id" and "Uid" as they are treated more like
words than initialisms in this codebase and there are already many many
instances if "Id", etc. that need renaming or exceptions and it's just
not worth it. :-)

Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2021-08-16 11:12:21 -04:00 committed by mergify[bot]
parent 89c64b3100
commit 2256a73262
1 changed files with 2 additions and 1 deletions

View File

@ -17,7 +17,8 @@ warningCode = 0
[rule.exported]
[rule.if-return]
[rule.increment-decrement]
#[rule.var-naming]
[rule.var-naming]
arguments = [["ID", "UID"]]
[rule.var-declaration]
[rule.package-comments]
[rule.range]