Documentation
¶
Index ¶
- func FormatCSV(w io.Writer, results []result.Result, _ string, _ ...FormatterOption) error
- func FormatCheckStyle(w io.Writer, results []result.Result, _ string, _ ...FormatterOption) error
- func FormatDefault(_ io.Writer, results []result.Result, _ string, options ...FormatterOption) error
- func FormatJSON(w io.Writer, results []result.Result, _ string, options ...FormatterOption) error
- func FormatJUnit(w io.Writer, results []result.Result, _ string, options ...FormatterOption) error
- func FormatSarif(w io.Writer, results []result.Result, baseDir string, _ ...FormatterOption) error
- func FormatText(writer io.Writer, results []result.Result, _ string, ...) error
- type Formatter
- type FormatterOption
- type JSONOutput
- type JUnitFailure
- type JUnitTestCase
- type JUnitTestSuite
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatCheckStyle ¶
func FormatDefault ¶
func FormatJSON ¶
func FormatJUnit ¶
func FormatSarif ¶
func FormatText ¶
Types ¶
type Formatter ¶
type Formatter func(w io.Writer, results []result.Result, baseDir string, options ...FormatterOption) error
Formatter formats scan results into a specific format
type FormatterOption ¶
type FormatterOption int
const ( ConciseOutput FormatterOption = iota IncludePassed )
type JSONOutput ¶
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 JUnitTestCase ¶
type JUnitTestCase struct { XMLName xml.Name `xml:"testcase"` Classname string `xml:"classname,attr"` Name string `xml:"name,attr"` Time string `xml:"time,attr"` Failure *JUnitFailure `xml:"failure,omitempty"` }
JUnitTestCase is a single test case with its result.
type JUnitTestSuite ¶
type JUnitTestSuite struct { XMLName xml.Name `xml:"testsuite"` Name string `xml:"name,attr"` Failures string `xml:"failures,attr"` Tests string `xml:"tests,attr"` TestCases []JUnitTestCase `xml:"testcase"` }
JUnitTestSuite is a single JUnit test suite which may contain many testcases.
Click to show internal directories.
Click to hide internal directories.