output

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatAggregated

func FormatAggregated(agg *AggregatedReport) string

Types

type AggregatedReport

type AggregatedReport struct {
	Upgrades  map[toolchain.Compiler]map[string]map[string]bool // compiler -> version -> paths
	Flags     map[string]map[string]bool                        // flag -> paths
	PassedAll []string
}

func AggregateFindings

func AggregateFindings(report *analyzer.Results) *AggregatedReport

func NewAggregatedReport

func NewAggregatedReport() *AggregatedReport

type Formatter

type Formatter interface {
	Format(report *analyzer.Results, w io.Writer) error
}

func GetFormatter

func GetFormatter(format string, opts FormatterOptions) (Formatter, error)

type FormatterOptions

type FormatterOptions struct {
	ShowPassed  bool
	ShowSkipped bool
	Invocation  *InvocationInfo
}

type InvocationInfo

type InvocationInfo struct {
	CommandLine string
	Arguments   []string
	StartTime   time.Time
	EndTime     time.Time
	WorkingDir  string
	Successful  bool
}

type SARIFArtifact

type SARIFArtifact struct {
	Location SARIFArtifactLocation `json:"location"`
	Hashes   map[string]string     `json:"hashes,omitempty"`
}

type SARIFArtifactLocation

type SARIFArtifactLocation struct {
	URI string `json:"uri"`
}

type SARIFConfiguration

type SARIFConfiguration struct {
	Level string `json:"level"`
}

type SARIFDriver

type SARIFDriver struct {
	Name           string      `json:"name"`
	InformationUri string      `json:"informationUri,omitempty"`
	Version        string      `json:"version,omitempty"`
	Rules          []SARIFRule `json:"rules,omitempty"`
}

type SARIFFormatter

type SARIFFormatter struct {
	IncludePassed  bool
	IncludeSkipped bool
	Invocation     *InvocationInfo
}

func (*SARIFFormatter) Format

func (f *SARIFFormatter) Format(report *analyzer.Results, w io.Writer) error

type SARIFInvocation

type SARIFInvocation struct {
	CommandLine                string                 `json:"commandLine,omitempty"`
	Arguments                  []string               `json:"arguments,omitempty"`
	ExecutionSuccessful        bool                   `json:"executionSuccessful"`
	StartTimeUtc               string                 `json:"startTimeUtc,omitempty"`
	EndTimeUtc                 string                 `json:"endTimeUtc,omitempty"`
	WorkingDirectory           *SARIFArtifactLocation `json:"workingDirectory,omitempty"`
	ToolExecutionNotifications []SARIFNotification    `json:"toolExecutionNotifications,omitempty"`
}

type SARIFLocation

type SARIFLocation struct {
	PhysicalLocation SARIFPhysicalLocation `json:"physicalLocation"`
}

type SARIFMessage

type SARIFMessage struct {
	Text string `json:"text"`
}

type SARIFNotification

type SARIFNotification struct {
	Level     string          `json:"level"`
	Message   SARIFMessage    `json:"message"`
	Locations []SARIFLocation `json:"locations,omitempty"`
}

type SARIFPhysicalLocation

type SARIFPhysicalLocation struct {
	ArtifactIndex int `json:"artifactIndex"`
}

type SARIFReport

type SARIFReport struct {
	Version string     `json:"version"`
	Schema  string     `json:"$schema"`
	Runs    []SARIFRun `json:"runs"`
}

type SARIFResult

type SARIFResult struct {
	RuleIndex int             `json:"ruleIndex"`
	Kind      string          `json:"kind,omitempty"`
	Level     string          `json:"level,omitempty"`
	Message   SARIFMessage    `json:"message"`
	Locations []SARIFLocation `json:"locations,omitempty"`
}

type SARIFRule

type SARIFRule struct {
	ID                   string             `json:"id"`
	Name                 string             `json:"name"`
	HelpUri              string             `json:"helpUri,omitempty"`
	FullDescription      SARIFMessage       `json:"fullDescription,omitempty"`
	DefaultConfiguration SARIFConfiguration `json:"defaultConfiguration"`
}

type SARIFRun

type SARIFRun struct {
	Tool        SARIFTool         `json:"tool"`
	Invocations []SARIFInvocation `json:"invocations,omitempty"`
	Results     []SARIFResult     `json:"results"`
	Artifacts   []SARIFArtifact   `json:"artifacts,omitempty"`
}

type SARIFTool

type SARIFTool struct {
	Driver SARIFDriver `json:"driver"`
}

type TextFormatter

type TextFormatter struct {
	ShowPassed  bool
	ShowSkipped bool
}

func (*TextFormatter) Format

func (f *TextFormatter) Format(report *analyzer.Results, w io.Writer) error

Jump to

Keyboard shortcuts

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