result

package
v0.0.0-...-7ababc3 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package result records rule results and provides reports and summary text on those results.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Type

type Type struct {
	Configuration toolConfigurationReportType `json:"configuration"`
	Projects      []projectReportType         `json:"projects"`
	Summary       summaryReportType           `json:"summary"`
}

Type is the type for the rule results data

var Results Type

Results is the global instance of the rule results result.Type struct

func (*Type) AddProjectSummary

func (results *Type) AddProjectSummary(lintedProject project.Type)

AddProjectSummary summarizes the results of all rules on the given project and adds it to the report.

func (*Type) AddSummary

func (results *Type) AddSummary()

AddSummary summarizes the rule results for all projects and adds it to the report.

func (*Type) Initialize

func (results *Type) Initialize()

Initialize adds the tool configuration data to the results data.

func (Type) JSONReport

func (results Type) JSONReport() string

JSONReport returns a JSON formatted report of rules on all projects in string encoding.

func (Type) Passed

func (results Type) Passed() bool

Passed returns whether the rules passed cumulatively.

func (Type) ProjectSummaryText

func (results Type) ProjectSummaryText(lintedProject project.Type) string

ProjectSummaryText returns a text summary of the rule results for the given project.

func (*Type) Record

func (results *Type) Record(lintedProject project.Type, ruleConfiguration ruleconfiguration.Type, ruleResult ruleresult.Type, ruleOutput string) string

Record records the result of a rule and returns a text summary for it.

func (Type) SummaryText

func (results Type) SummaryText() string

SummaryText returns a text summary of the cumulative rule results.

func (Type) WriteReport

func (results Type) WriteReport() error

WriteReport writes a report for all projects to the specified file.

Directories

Path Synopsis
Package feedback provides feedback to the user.
Package feedback provides feedback to the user.
Package outputformat defines the output formats
Package outputformat defines the output formats

Jump to

Keyboard shortcuts

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