Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // AllFormatStrings is all format strings without aliases. // // Sorted in the order we want to display them. AllFormatStrings = []string{ "text", "json", "msvs", "junit", "github-actions", } // AllFormatStringsWithAliases is all format strings with aliases. // // Sorted in the order we want to display them. AllFormatStringsWithAliases = []string{ "text", "gcc", "json", "msvs", "junit", "github-actions", } )
Functions ¶
func PrintFileAnnotationSet ¶ added in v1.32.0
func PrintFileAnnotationSet(writer io.Writer, fileAnnotationSet FileAnnotationSet, formatString string) error
PrintFileAnnotationSet prints the file annotations separated by newlines.
Types ¶
type FileAnnotation ¶
type FileAnnotation interface {
// Stringer returns the string representation for this FileAnnotation.
fmt.Stringer
// FileInfo is the FileInfo for this annotation.
//
// This may be nil.
FileInfo() FileInfo
// StartLine is the starting line.
//
// If the starting line is not known, this will be 0.
StartLine() int
// StartColumn is the starting column.
//
// If the starting column is not known, this will be 0.
StartColumn() int
// EndLine is the ending line.
//
// If the ending line is not known, this will be 0.
// If the ending line is the same as the starting line, this will be explicitly
// set to the same value as start_line.
EndLine() int
// EndColumn is the ending column.
//
// If the ending column is not known, this will be 0.
// If the ending column is the same as the starting column, this will be explicitly
// set to the same value as start_column.
EndColumn() int
// Type is the type of annotation, typically an ID representing a failure type.
Type() string
// Message is the message of the annotation.
Message() string
// PluginName is the name of the plugin that the annotation originated from.
//
// May be empty if this annotation did not originate from a plugin.
// This may be added to the printed message field for certain printers.
PluginName() string
// contains filtered or unexported methods
}
FileAnnotation is a file annotation.
type FileAnnotationSet ¶ added in v1.32.0
type FileAnnotationSet interface {
// Stringer returns the string representation for this FileAnnotationSet.
fmt.Stringer
// error returns an error for this FileAnnotationSet. It will use the text format
// to create an error message.
error
// FileAnnotations returns the FileAnnotations in the set.
//
// This will always be non-empty.
// These will be deduplicated and sorted.
FileAnnotations() []FileAnnotation
// contains filtered or unexported methods
}
FileAnnotationSet is a set of FileAnnotations.
func NewFileAnnotationSet ¶ added in v1.32.0
func NewFileAnnotationSet(fileAnnotations ...FileAnnotation) FileAnnotationSet
NewFileAnnotationSet returns a new FileAnnotationSet.
If len(fileAnnotations) is 0, this returns nil.
type Format ¶
type Format int
Format is a FileAnnotation format.
const ( // FormatText is the text format for FileAnnotations. FormatText Format = iota + 1 // FormatJSON is the JSON format for FileAnnotations. FormatJSON // FormatMSVS is the MSVS format for FileAnnotations. FormatMSVS // FormatJUnit is the JUnit format for FileAnnotations. FormatJUnit // FormatGithubActions is the Github Actions format for FileAnnotations. // // See https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-error-message. FormatGithubActions )
Source Files
¶
Click to show internal directories.
Click to hide internal directories.