-
Notifications
You must be signed in to change notification settings - Fork 13
False positive for ignored field #83
Copy link
Copy link
Closed
Description
I have structs like:
type Build struct {
Version string `json:"version,omitempty"`
BuildTimestamp string `json:"buildTimestamp,omitempty"`
Revision string `json:"revision,omitempty"`
}
type Site struct {
Build *Build `json:"build,omitempty" yaml:"-"`
Index string `json:"index" yaml:"index"`
Title string `json:"title" yaml:"title"`
SizeField bool `json:"-" yaml:"sizeField,omitempty"`
}Linter complains that the given struct should be annotated with the yaml tag. It seems it is complaining that Build has no yaml tag, but it doe not need it because it is an ignored field for yaml, see yaml:"-" there.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels