From a9a45eb5845d449e719c8abcd88d2419dfcd50e4 Mon Sep 17 00:00:00 2001 From: George M Date: Mon, 7 Aug 2023 19:47:52 -0400 Subject: [PATCH] Temporarily turn off traceId checker --- README.md | 2 ++ internal/checkers/checker.go | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c5b226a..5081603 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ ## Description +Still under development 🚧 + A linter checks the odd number of key and value pairs for common logger libraries: - [kitlog](https://github.com/go-kit/log) - [klog](https://github.com/kubernetes/klog) diff --git a/internal/checkers/checker.go b/internal/checkers/checker.go index b1f2baa..a48ed0d 100644 --- a/internal/checkers/checker.go +++ b/internal/checkers/checker.go @@ -52,8 +52,9 @@ func ExecuteChecker(c Checker, pass *analysis.Pass, call CallContext, cfg Config Message: "odd number of arguments passed as key-value pairs for logging", }) } - - hasTraceId := false + // TODO: VERY IMPORTANT 🚨 should initialize hasTraceId to false + // hasTraceId is initialized to true to temporarily turn off traceId check + hasTraceId := true for i := 0; i < len(keyValuesArgs); i += 2 { arg := keyValuesArgs[i] basic, ok := arg.(*ast.BasicLit)