Documentation ¶
Index ¶
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 ReportForGithubAction ¶ added in v1.0.1
func ReportForGithubAction(result AnalyzeResult, cfg Config)
func ReportForHuman ¶ added in v1.0.1
func ReportForHuman(result AnalyzeResult, cfg Config)
Types ¶
type AnalyzeResult ¶ added in v1.0.1
type AnalyzeResult struct { FilesBelowThreshold []CoverageStats PackagesBelowThreshold []CoverageStats MeetsTotalCoverage bool TotalCoverage int }
func Analyze ¶
func Analyze(cfg Config, coverageStats []CoverageStats) AnalyzeResult
func (*AnalyzeResult) Pass ¶ added in v1.0.1
func (r *AnalyzeResult) Pass() bool
type Config ¶
type Config struct { Profile string `yaml:"profile"` LocalPrefix string `yaml:"localPrefix"` Threshold Threshold `yaml:"threshold"` GithubActionOutput bool `yaml:"githubActionOutput"` }
func ConfigFromFile ¶
type CoverageStats ¶
type CoverageStats struct {
// contains filtered or unexported fields
}
func GenerateCoverageStats ¶
func GenerateCoverageStats(profileFileName string) ([]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.