Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasInlineIgnore ¶
HasInlineIgnore returns true if the line contains a pgspectre:ignore comment.
Types ¶
type IgnoreFile ¶
type IgnoreFile struct {
Suppressions []Suppression `yaml:"suppressions"`
}
IgnoreFile is the structure of .pgspectre-ignore.yml.
type Rules ¶
type Rules struct {
// contains filtered or unexported fields
}
Rules holds loaded suppression rules from all sources.
func LoadRules ¶
LoadRules loads suppression rules from .pgspectre-ignore.yml in the given directory.
func (*Rules) Filter ¶
Filter removes suppressed findings and returns the remaining ones. Returns the filtered list and the number of suppressed findings.
func (*Rules) IsSuppressed ¶
IsSuppressed returns true if the finding should be suppressed.
func (*Rules) WithConfigFindings ¶
WithConfigFindings adds finding-type suppressions from config.
type Suppression ¶
type Suppression struct {
Table string `yaml:"table"`
Type string `yaml:"type,omitempty"`
Reason string `yaml:"reason,omitempty"`
}
Suppression is a single rule in the ignore file.
Click to show internal directories.
Click to hide internal directories.