Documentation ¶
Index ¶
- Variables
- func ConfigFromFile(cfg *Config, filename string) error
- func CoveredPercentage(total, covered int64) int
- func ReportForGithubAction(w io.Writer, result AnalyzeResult, thr Threshold)
- func ReportForHuman(w io.Writer, result AnalyzeResult, thr Threshold)
- func SetGithubActionOutput(result AnalyzeResult) error
- type AnalyzeResult
- type Config
- type CoverageStats
- type FuncExtent
- type FuncVisitor
- type Threshold
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrThresholdNotInRange = fmt.Errorf("threshold must be in range [0 - 100]") ErrCoverageProfileNotSpecified = fmt.Errorf("coverage profile file not specified") )
Functions ¶
func ConfigFromFile ¶
func CoveredPercentage ¶ added in v2.5.0
func ReportForGithubAction ¶
func ReportForGithubAction(w io.Writer, result AnalyzeResult, thr Threshold)
func ReportForHuman ¶
func ReportForHuman(w io.Writer, result AnalyzeResult, thr Threshold)
func SetGithubActionOutput ¶
func SetGithubActionOutput(result AnalyzeResult) error
Types ¶
type AnalyzeResult ¶
type AnalyzeResult struct { FilesBelowThreshold []CoverageStats PackagesBelowThreshold []CoverageStats MeetsTotalCoverage bool TotalCoverage int }
func Analyze ¶
func Analyze(cfg Config, coverageStats []CoverageStats) AnalyzeResult
func (*AnalyzeResult) Pass ¶
func (r *AnalyzeResult) Pass() bool
type Config ¶
type CoverageStats ¶
func GenerateCoverageStats ¶
func GenerateCoverageStats(cfg Config) ([]CoverageStats, error)
func (*CoverageStats) CoveredPercentage ¶
func (s *CoverageStats) CoveredPercentage() int
type FuncExtent ¶
type FuncExtent struct {
// contains filtered or unexported fields
}
FuncExtent describes a function's extent in the source by file and position.
type FuncVisitor ¶
type FuncVisitor struct {
// contains filtered or unexported fields
}
FuncVisitor implements the visitor that builds the function position list for a file.
Click to show internal directories.
Click to hide internal directories.