From 6b92a80ded22ca3e728a24ccba8c6618b2f10fd3 Mon Sep 17 00:00:00 2001 From: Ivan Valdes Date: Wed, 1 May 2024 10:49:46 -0700 Subject: [PATCH] tools/golangci: enable var-naming linter rule Signed-off-by: Ivan Valdes --- tools/.golangci.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/.golangci.yaml b/tools/.golangci.yaml index f1e03a6d8..ba153f6a2 100644 --- a/tools/.golangci.yaml +++ b/tools/.golangci.yaml @@ -87,9 +87,13 @@ linters-settings: # please keep this alphabetized - name: error-strings severity: error disabled: false - # TODO: enable the following rules - name: var-naming - disabled: true + disabled: false + arguments: + # The following is the configuration for var-naming rule, the first element is the allow list and the second element is the deny list. + - [] # AllowList: leave it empty to use the default (empty, too). This means that we're not relaxing the rule in any way, i.e. elementId will raise a violation, it should be elementID, refer to the next line to see the list of denied initialisms. + - ["GRPC", "WAL"] # DenyList: Add GRPC and WAL to strict the rule not allowing instances like Wal or Grpc. The default values are located at commonInitialisms, refer to: https://github.com/mgechev/revive/blob/v1.3.7/lint/utils.go#L93-L133. + # TODO: enable the following rules - name: exported disabled: true - name: unexported-return