Documentation
¶
Overview ¶
Package lang provides language runtime commands (go, dotnet).
Index ¶
- func FormatBuildSummary(s *BuildSummary) string
- func FormatTestSummary(s *TestSummary) string
- type BinlogIssue
- type BuildSummary
- type FailedTest
- type GoTestEvent
- type RSpecExample
- type RSpecException
- type RSpecJSON
- type RSpecSummary
- type RuboCopFile
- type RuboCopJSON
- type RuboCopLocation
- type RuboCopMetadata
- type RuboCopOffense
- type RuboCopSummary
- type TRXErrorInfo
- type TRXFile
- type TRXOutput
- type TRXResults
- type TRXTimes
- type TRXUnitResult
- type TRXUnitTest
- type TestSummary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatBuildSummary ¶
func FormatBuildSummary(s *BuildSummary) string
FormatBuildSummary formats a build summary for display.
func FormatTestSummary ¶
func FormatTestSummary(s *TestSummary) string
FormatTestSummary formats a test summary for display.
Types ¶
type BinlogIssue ¶
type BinlogIssue struct {
Code string
File string
Line int
Column int
Kind string // "error" or "warning"
Message string
}
BinlogIssue represents a build error or warning from MSBuild output.
type BuildSummary ¶
type BuildSummary struct {
Succeeded bool
ProjectCount int
Errors []BinlogIssue
Warnings []BinlogIssue
DurationText string
}
BuildSummary holds aggregated build results.
func ParseBuildOutput ¶
func ParseBuildOutput(output string) *BuildSummary
ParseBuildOutput parses MSBuild/dotnet build output and extracts errors/warnings.
type FailedTest ¶
FailedTest holds details about a failed test.
type GoTestEvent ¶
type RSpecExample ¶
type RSpecException ¶
type RSpecJSON ¶
type RSpecJSON struct {
Version string `json:"version"`
Examples []RSpecExample `json:"examples"`
Summary RSpecSummary `json:"summary"`
}
RSpecJSON represents the JSON output from rspec --format json
type RSpecSummary ¶
type RuboCopFile ¶
type RuboCopFile struct {
Path string `json:"path"`
Offenses []RuboCopOffense `json:"offenses"`
}
type RuboCopJSON ¶
type RuboCopJSON struct {
Metadata RuboCopMetadata `json:"metadata"`
Files []RuboCopFile `json:"files"`
Summary RuboCopSummary `json:"summary"`
}
RuboCopJSON represents the JSON output from rubocop --format json
type RuboCopLocation ¶
type RuboCopLocation struct {
StartLine int `json:"start_line"`
}
type RuboCopMetadata ¶
type RuboCopMetadata struct {
RuboCopVersion string `json:"rubocop_version"`
}
type RuboCopOffense ¶
type RuboCopOffense struct {
Severity string `json:"severity"`
Message string `json:"message"`
CopName string `json:"cop_name"`
Location RuboCopLocation `json:"location"`
}
type RuboCopSummary ¶
type TRXErrorInfo ¶
type TRXErrorInfo struct {
XMLName xml.Name `xml:"ErrorInfo"`
Message string `xml:"Message"`
StackTrace string `xml:"StackTrace"`
}
TRXErrorInfo holds error message and stack trace.
type TRXFile ¶
type TRXFile struct {
XMLName xml.Name `xml:"TestRun"`
ID string `xml:"id,attr"`
Name string `xml:"name,attr"`
RunConfig struct {
XMLName xml.Name `xml:"RunConfiguration"`
} `xml:"RunConfiguration"`
Times TRXTimes `xml:"Times"`
Results TRXResults `xml:"Results"`
TestDefs struct {
UnitTests []TRXUnitTest `xml:"UnitTest"`
} `xml:"TestDefinitions"`
}
TRXFile represents a Visual Studio Test Results XML file.
type TRXOutput ¶
type TRXOutput struct {
XMLName xml.Name `xml:"Output"`
ErrorInfo TRXErrorInfo `xml:"ErrorInfo"`
StdOut string `xml:"StdOut"`
}
TRXOutput holds test output (error messages, stdout).
type TRXResults ¶
type TRXResults struct {
XMLName xml.Name `xml:"Results"`
UnitResults []TRXUnitResult `xml:"UnitTestResult"`
}
TRXResults holds unit test results.
type TRXTimes ¶
type TRXTimes struct {
XMLName xml.Name `xml:"Times"`
Creation string `xml:"creation,attr"`
Queuing string `xml:"queuing,attr"`
Start string `xml:"start,attr"`
Finish string `xml:"finish,attr"`
}
TRXTimes holds start and finish timestamps.
type TRXUnitResult ¶
type TRXUnitResult struct {
XMLName xml.Name `xml:"UnitTestResult"`
TestID string `xml:"testId,attr"`
TestName string `xml:"testName,attr"`
Outcome string `xml:"outcome,attr"`
Duration string `xml:"duration,attr"`
StartTime string `xml:"startTime,attr"`
EndTime string `xml:"endTime,attr"`
Output TRXOutput `xml:"Output"`
}
TRXUnitResult holds a single test result.
type TRXUnitTest ¶
type TRXUnitTest struct {
XMLName xml.Name `xml:"UnitTest"`
ID string `xml:"id,attr"`
Name string `xml:"name,attr"`
Storage string `xml:"storage,attr"`
}
TRXUnitTest holds test definition metadata.
type TestSummary ¶
type TestSummary struct {
Total int
Passed int
Failed int
Skipped int
FailedTests []FailedTest
Duration time.Duration
DurationText string
}
TestSummary holds aggregated test results.
func ParseTRXContent ¶
func ParseTRXContent(content string) (*TestSummary, error)
ParseTRXContent parses TRX XML content and returns a summary.
func ParseTRXFile ¶
func ParseTRXFile(path string) (*TestSummary, error)
ParseTRXFile parses a .trx test results file and returns a summary.
func ParseTestOutput ¶
func ParseTestOutput(output string) *TestSummary
ParseTestOutput parses dotnet test output and extracts test results.