Documentation ¶
Index ¶
- func GitHubSarifWriter(data interface{}, writers []io.Writer) error
- func HumanReadableWriter(data interface{}, writers []io.Writer) error
- func JSONWriter(data interface{}, writers []io.Writer) error
- func JUnitXMLWriter(data interface{}, writers []io.Writer) error
- func RegisterWriter(format supportedFormat, writerFunc func(interface{}, []io.Writer) error)
- func SarifWriter(data interface{}, writers []io.Writer) error
- func Write(format string, data interface{}, writers []io.Writer) error
- func XMLWriter(data interface{}, writers []io.Writer) error
- func YAMLWriter(data interface{}, writers []io.Writer) error
- type JUnitFailure
- type JUnitProperty
- type JUnitSkipMessage
- type JUnitTestCase
- type JUnitTestSuite
- type JUnitTestSuites
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GitHubSarifWriter ¶ added in v1.18.2
GitHubSarifWriter writes sarif formatted violation results report that are well suited for github codescanning alerts display
func HumanReadableWriter ¶ added in v1.18.2
HumanReadableWriter display scan summary in human readable format
func JSONWriter ¶
JSONWriter prints data in JSON format
func JUnitXMLWriter ¶
JUnitXMLWriter writes scan summary in junit xml format
func RegisterWriter ¶
RegisterWriter registers a writer for terrascan
func SarifWriter ¶
SarifWriter writes sarif formatted violation results report
func YAMLWriter ¶
YAMLWriter prints data in YAML format
Types ¶
type JUnitFailure ¶
type JUnitFailure struct { Message string `xml:"message,attr"` Type string `xml:"type,attr"` Contents string `xml:",chardata"` }
JUnitFailure contains data related to a failed test.
type JUnitProperty ¶
JUnitProperty represents a key/value pair used to define properties.
type JUnitSkipMessage ¶
type JUnitSkipMessage struct {
Message string `xml:"message,attr"`
}
JUnitSkipMessage contains the reason why a testcase was skipped.
type JUnitTestCase ¶
type JUnitTestCase struct { XMLName xml.Name `xml:"testcase"` Classname string `xml:"classname,attr"` Name string `xml:"name,attr"` Severity string `xml:"severity,attr"` Category string `xml:"category,attr"` // omit empty time because today we do not have this data Time string `xml:"time,attr,omitempty"` SkipMessage *JUnitSkipMessage `xml:"skipped,omitempty"` Failure *JUnitFailure `xml:"failure,omitempty"` }
JUnitTestCase is a single test case with its result.
type JUnitTestSuite ¶
type JUnitTestSuite struct { XMLName xml.Name `xml:"testsuite"` Tests int `xml:"tests,attr"` Failures int `xml:"failures,attr"` Time string `xml:"time,attr"` Name string `xml:"name,attr"` Package string `xml:"package,attr"` Branch string `xml:"branch,attr,omitempty"` Properties []JUnitProperty `xml:"properties>property,omitempty"` TestCases []JUnitTestCase }
JUnitTestSuite is a single JUnit test suite which may contain many testcases.
type JUnitTestSuites ¶
type JUnitTestSuites struct { XMLName xml.Name `xml:"testsuites"` Tests int `xml:"tests,attr"` Name string `xml:"name,attr"` Failures int `xml:"failures,attr"` Time string `xml:"time,attr"` Suites []JUnitTestSuite }
JUnitTestSuites is a collection of JUnit test suites.