Skip to content

Commit

Permalink
Temporarily turn off traceId checker
Browse files Browse the repository at this point in the history
  • Loading branch information
george-maroun committed Aug 7, 2023
1 parent 3080ae9 commit a9a45eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions internal/checkers/checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a9a45eb

Please sign in to comment.