Skip to content

Commit

Permalink
Deprecate lint in favor of https://github.com/ykadowak/zerologlint
Browse files Browse the repository at this point in the history
  • Loading branch information
mitar committed Aug 2, 2023
1 parent 9c29f78 commit 95069b8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions cmd/lint/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Zerolog Lint

**DEPRECATED: In favor of https://github.com/ykadowak/zerologlint which is integrated with `go vet` and [golangci-lint](https://golangci-lint.run/).**

This is a basic linter that checks for missing log event finishers. Finds errors like: `log.Error().Int64("userID": 5)` - missing the `Msg`/`Msgf` finishers.

## Problem
Expand All @@ -23,15 +25,14 @@ The command accepts only one argument - the package to be inspected - and 4 opti
#### Flags

- finisher
- specify which finishers to accept, defaults to `Msg` and `Msgf`
- specify which finishers to accept, defaults to `Msg` and `Msgf`
- ignoreFile
- which files to ignore, either by full path or by go path (package/file.go)
- which files to ignore, either by full path or by go path (package/file.go)
- ignorePkg
- do not inspect the specified package if found in the dependency tree
- do not inspect the specified package if found in the dependency tree
- ignorePkgRecursively
- do not inspect the specified package or its subpackages if found in the dependency tree
- do not inspect the specified package or its subpackages if found in the dependency tree

## Drawbacks

As it is, linter can generate a false positives in a specific case. These false positives come from the fact that if you have a method that returns a `zerolog.Event` the linter will flag it because you are obviously not finishing the event. This will be solved in later release.

0 comments on commit 95069b8

Please sign in to comment.