Documentation
¶
Overview ¶
Package configvalidate checks Codog configuration files and reports fixes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatDiagnostics ¶
Types ¶
type Diagnostic ¶
type Diagnostic struct {
Path string `json:"path"`
Field string `json:"field"`
Line *int `json:"line,omitempty"`
Kind string `json:"kind"`
Message string `json:"message"`
Expected string `json:"expected,omitempty"`
Got string `json:"got,omitempty"`
Suggestion string `json:"suggestion,omitempty"`
Replacement string `json:"replacement,omitempty"`
}
type FieldType ¶
type FieldType string
const ( FieldString FieldType = "string" FieldBool FieldType = "bool" FieldObject FieldType = "object" FieldStringArray FieldType = "string_array" FieldHookArray FieldType = "hook_array" FieldNumber FieldType = "number" FieldStringOrStringArray FieldType = "string_or_string_array" FieldStringArrayOrMap FieldType = "string_array_or_map" FieldStringMap FieldType = "string_map" FieldRulesImport FieldType = "rules_import" )
type Report ¶
type Report struct {
Kind string `json:"kind"`
Status string `json:"status"`
FileCount int `json:"file_count"`
PresentCount int `json:"present_count"`
ErrorCount int `json:"error_count"`
WarningCount int `json:"warning_count"`
Paths []string `json:"paths"`
Results []Result `json:"results"`
}
func ValidateFiles ¶
type Result ¶
type Result struct {
Kind string `json:"kind"`
Path string `json:"path"`
Present bool `json:"present"`
Status string `json:"status"`
ErrorCount int `json:"error_count"`
WarningCount int `json:"warning_count"`
Errors []Diagnostic `json:"errors,omitempty"`
Warnings []Diagnostic `json:"warnings,omitempty"`
}
func ValidateBytes ¶
func ValidateFile ¶
Click to show internal directories.
Click to hide internal directories.