Documentation
¶
Overview ¶
Copyright 2022 Dave Shanley / Quobix SPDX-License-Identifier: MIT
Index ¶
Constants ¶
View Source
const MaxViolations = 100
MaxViolations the maximum number of violations the report will render per broken rule. TODO: make this configurable
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTMLReport ¶
func NewHTMLReport ¶
func NewHTMLReport(data *ValidationReportData) HTMLReport
type ReportData ¶
type ReportData struct {
BundledJS template.JS `json:"bundledJS"`
HydrateJS template.JS `json:"hydrateJS"`
ShoelaceJS string `json:"shoelaceJS"`
ReportCSS template.CSS `json:"reportCSS"`
Statistics *ReportStatistics `json:"reportStatistics"`
TestMode bool `json:"test"`
RuleCategories []*RuleCategory `json:"ruleCategories"`
RuleResults []*validation.Error `json:"ruleResults"`
MaxViolations int `json:"maxViolations"`
Generated time.Time `json:"generated"`
Version string `json:"version"`
SpecString []string `json:"-"`
RuleMetadata map[string]*RuleMetadata `json:"-"` // Map of rule ID to metadata
}
ReportData is the internal struct used by the HTML template
type ReportStatistics ¶
ReportStatistics contains validation statistics
type RuleCategory ¶
RuleCategory represents a category of validation rules
type RuleMetadata ¶
RuleMetadata contains metadata about a rule
type ValidationReportData ¶
type ValidationReportData struct {
Results []*validation.Error // Validation errors from the linter
Categories []*RuleCategory // Rule categories
Statistics *ReportStatistics // Statistics summary
SpecBytes []byte // Original spec bytes for source display
Generated time.Time // When the report was generated
RuleMetadata map[string]*RuleMetadata // Rule ID to metadata mapping
}
ValidationReportData contains all data needed for report generation using the new linter
Click to show internal directories.
Click to hide internal directories.