Documentation
¶
Overview ¶
@structurelint:ignore test-adjacency Output formatters are integration-tested through CLI
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONFormatter ¶
type JSONFormatter struct {
Version string
}
JSONFormatter formats violations as JSON
type JSONOutput ¶
type JSONOutput struct {
Version string `json:"version"`
Timestamp string `json:"timestamp"`
Violations int `json:"violations"`
Results []JSONViolation `json:"results"`
}
JSONOutput represents the JSON output structure
type JSONViolation ¶
type JSONViolation struct {
Rule string `json:"rule"`
Path string `json:"path"`
Message string `json:"message"`
}
JSONViolation represents a single violation in JSON format
type JUnitFailure ¶
type JUnitFailure struct {
Message string `xml:"message,attr"`
Type string `xml:"type,attr"`
Content string `xml:",chardata"`
}
JUnitFailure represents a test failure
type JUnitTestCase ¶
type JUnitTestCase struct {
Name string `xml:"name,attr"`
Classname string `xml:"classname,attr"`
Time string `xml:"time,attr"`
Failure *JUnitFailure `xml:"failure,omitempty"`
}
JUnitTestCase represents a test case
type JUnitTestSuite ¶
type JUnitTestSuite struct {
Name string `xml:"name,attr"`
Tests int `xml:"tests,attr"`
Failures int `xml:"failures,attr"`
Errors int `xml:"errors,attr"`
Time string `xml:"time,attr"`
Timestamp string `xml:"timestamp,attr"`
TestCases []JUnitTestCase `xml:"testcase"`
}
JUnitTestSuite represents a test suite
type JUnitTestSuites ¶
type JUnitTestSuites struct {
XMLName xml.Name `xml:"testsuites"`
XMLNS string `xml:"xmlns,attr,omitempty"`
Name string `xml:"name,attr"`
Tests int `xml:"tests,attr"`
Failures int `xml:"failures,attr"`
Errors int `xml:"errors,attr"`
Time string `xml:"time,attr"`
TestSuites []JUnitTestSuite `xml:"testsuite"`
}
JUnitTestSuites represents the root element of JUnit XML
Click to show internal directories.
Click to hide internal directories.