Documentation
¶
Overview ¶
Command validate-log-fields scans a Go project for deprecated logging field names and reports offenses.
Exit codes:
0 No new offenses found (the codebase is clean, or all offenses are already tracked in the TODO file). 1 New offenses found that are not yet tracked in the TODO file. 2 Unexpected error (scan failure, unreadable TODO file, etc.).
Usage:
go run gitlab.com/gitlab-org/labkit/v2/cmd/validate-log-fields [flags] [dir]
Flags:
-todo string Path to the TODO file (default ".labkit_logging_todo.yml") -update-todo Merge new offenses into the TODO file and exit 0
Examples:
# Check for new offenses in the current directory (CI-safe: exits 1 on new offenses) go run gitlab.com/gitlab-org/labkit/v2/cmd/validate-log-fields . # Persist new offenses for deferred remediation and exit 0 go run gitlab.com/gitlab-org/labkit/v2/cmd/validate-log-fields -update-todo .
Click to show internal directories.
Click to hide internal directories.