Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Offense ¶
type Offense struct {
// Callsite is the file path (relative to the scanned directory) where the
// deprecated field was found.
Callsite string `yaml:"callsite"`
// DeprecatedField is the field name string that should be replaced.
DeprecatedField string `yaml:"deprecated_field"` //nolint:tagliatelle
// StandardField is the labkit fields constant to use instead.
StandardField string `yaml:"standard_field"` //nolint:tagliatelle
}
Offense represents a single instance of a deprecated logging field being used in a source file. One offense is recorded per unique (callsite, deprecated_field) pair.
type ParseWarningError ¶
type ParseWarningError struct {
Count int // number of files that failed to parse
Total int // total number of Go files encountered
}
ParseWarningError is returned alongside offenses by Scan when some (but not all) Go files failed to parse. Callers can use errors.As to detect this and treat it as a non-fatal warning rather than a hard failure.
func (*ParseWarningError) Error ¶
func (e *ParseWarningError) Error() string
type TodoFile ¶
type TodoFile struct {
Offenses []Offense `yaml:"offenses"`
}
TodoFile is the in-memory representation of .labkit_logging_todo.yml.
Click to show internal directories.
Click to hide internal directories.