Documentation ¶
Index ¶
- func CheckContentHash(expectedHash, content string) bool
- func SHA256(content string) string
- func ValidateConfigFile(config ConfigFile) error
- type ConfigFile
- type FileReport
- type Finding
- type Fn
- type Ignore
- type IncludeRaw
- type RawConfig
- type RawFn
- type RawRule
- type Rule
- type RuleFunc
- func BuildFileFnBuiltin(f RawFn) RuleFunc
- func BuildFileFnJs(f RawFn) RuleFunc
- func BuildFileScopeFn(f RawFn) RuleFunc
- func BuildFn(f RawFn) RuleFunc
- func BuildLineFn(f RawFn) RuleFunc
- func BuildPathFnBuiltin(f RawFn) RuleFunc
- func BuildPathFnJs(f RawFn) RuleFunc
- func BuildPathScopeFn(f RawFn) RuleFunc
- type Scope
- type SeverityLevel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckContentHash ¶
func ValidateConfigFile ¶
func ValidateConfigFile(config ConfigFile) error
Types ¶
type ConfigFile ¶
func LoadConfigFile ¶
func LoadConfigFile(content string) (ConfigFile, error)
type FileReport ¶
func ProcessFile ¶
func ProcessFile(content string, path string, cfg ConfigFile) (FileReport, error)
type IncludeRaw ¶
type RawConfig ¶
type RawConfig struct { Version string Includes []IncludeRaw Rules []RawRule }
type Rule ¶
type Rule struct { Fn RuleFunc Id string Description string Recommendation string Severity SeverityLevel // Link to the documentation for this Rule Link string // FilenameRegex is the regexp used to determine if this Rule should run on a given file IncludePaths *regexp.Regexp ExcludePaths *regexp.Regexp Scope Scope }
type RuleFunc ¶
func BuildFileFnBuiltin ¶
func BuildFileFnJs ¶
func BuildFileScopeFn ¶
func BuildLineFn ¶
func BuildPathFnBuiltin ¶
func BuildPathFnJs ¶
func BuildPathScopeFn ¶
type SeverityLevel ¶
type SeverityLevel int
Click to show internal directories.
Click to hide internal directories.