From 2256a73262455a761a66035389302bc139638f46 Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Mon, 16 Aug 2021 11:12:21 -0400 Subject: [PATCH] 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 --- .revive.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.revive.toml b/.revive.toml index b7388ea..95c91b7 100644 --- a/.revive.toml +++ b/.revive.toml @@ -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]