formatters

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatCSV

func FormatCSV(w io.Writer, results []scanner.Result) error

func FormatCheckStyle

func FormatCheckStyle(w io.Writer, results []scanner.Result) error

func FormatDefault

func FormatDefault(_ io.Writer, results []scanner.Result) error

func FormatJSON

func FormatJSON(w io.Writer, results []scanner.Result) error

func FormatJUnit

func FormatJUnit(w io.Writer, results []scanner.Result) error

func FormatText

func FormatText(_ io.Writer, results []scanner.Result) error

Types

type Formatter

type Formatter func(w io.Writer, results []scanner.Result) error

Formatter formats scan results into a specific format

type JSONOutput

type JSONOutput struct {
	Results []scanner.Result `json:"results"`
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL