Documentation ¶
Index ¶
Constants ¶
View Source
const File config.CheckType = "file"
View Source
const FileDiff config.CheckType = "filediff"
Variables ¶
This section is empty.
Functions ¶
func RegisterChecks ¶
func RegisterChecks()
Types ¶
type FileCheck ¶
type FileCheck struct { config.CheckBase `yaml:",inline"` Path string `yaml:"path"` DisallowedPattern string `yaml:"disallowed-pattern"` ExcludePattern string `yaml:"exclude-pattern"` SkipDir []string `yaml:"skip-dir"` }
FileCheck is a simple File absence check which can be for a single file or a pattern.
func (*FileCheck) RequiresData ¶
RequiresData implementation for file check. Since this check acts on the existence of files on disk, it does not require any data.
type FileDiffCheck ¶ added in v0.3.1
type FileDiffCheck struct { config.CheckBase `yaml:",inline"` // TargetFile will be compared with SourceFile. TargetFile string `yaml:"target"` // SourceFile can be a local file or a remote URI. SourceFile string `yaml:"source"` // SourceContext list of key-values to compile the source file as a Jinja template. SourceContext map[string]any `yaml:"source-context"` // ContextLines number of context lines around the line changes. ContextLines int `yaml:"context-lines"` // IgnoreMissing allows non-existent files to not be counted as a Fail. // Using a pointer here so that we can differentiate between // false (default value) and an empty value. IgnoreMissing *bool `yaml:"ignore-missing"` }
func (*FileDiffCheck) FetchData ¶ added in v0.3.1
func (c *FileDiffCheck) FetchData()
FetchData implementation for FileDiffCheck
func (*FileDiffCheck) Merge ¶ added in v0.3.1
func (c *FileDiffCheck) Merge(mergeCheck config.Check) error
Merge implementation for FileDiffCheck check.
func (*FileDiffCheck) RequiresData ¶ added in v0.3.1
func (c *FileDiffCheck) RequiresData() bool
RequiresData implementation for FileDiffCheck.
func (*FileDiffCheck) RunCheck ¶ added in v0.3.1
func (c *FileDiffCheck) RunCheck()
RunCheck implementation for FileDiffCheck check.
func (*FileDiffCheck) UnmarshalDataMap ¶ added in v0.3.1
func (c *FileDiffCheck) UnmarshalDataMap()
UnmarshalDataMap implementation for FileDiffCheck check.
Click to show internal directories.
Click to hide internal directories.