Documentation
¶
Index ¶
- Variables
- func Check(w io.Writer, cfg Config) bool
- func ConfigFromFile(cfg *Config, filename string) error
- func GenerateCoverageStats(cfg Config) ([]coverage.Stats, error)
- func ReportForGithubAction(w io.Writer, result AnalyzeResult)
- func ReportForHuman(w io.Writer, result AnalyzeResult)
- func SetGithubActionOutput(result AnalyzeResult, report string) error
- func TotalLinesDiff(diff []FileCoverageDiff) int
- type AnalyzeResult
- type Badge
- type Config
- type Diff
- type Exclude
- type FileCoverageDiff
- type Override
- type Threshold
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrThresholdNotInRange = errors.New("threshold must be in range [0 - 100]") ErrCoverageProfileNotSpecified = errors.New("coverage profile file not specified") ErrRegExpNotValid = errors.New("regular expression is not valid") ErrCDNOptionNotSet = errors.New("CDN options are not valid") ErrGitOptionNotSet = errors.New("git options are not valid") )
Functions ¶
func ConfigFromFile ¶
func ReportForGithubAction ¶
func ReportForGithubAction(w io.Writer, result AnalyzeResult)
func ReportForHuman ¶
func ReportForHuman(w io.Writer, result AnalyzeResult)
func SetGithubActionOutput ¶
func SetGithubActionOutput(result AnalyzeResult, report string) error
func TotalLinesDiff ¶
func TotalLinesDiff(diff []FileCoverageDiff) int
Types ¶
type AnalyzeResult ¶
type AnalyzeResult struct {
Threshold Threshold
FilesBelowThreshold []coverage.Stats
PackagesBelowThreshold []coverage.Stats
TotalStats coverage.Stats
HasBaseBreakdown bool
Diff []FileCoverageDiff
HasOverrides bool
}
func (*AnalyzeResult) MeetsTotalCoverage ¶
func (r *AnalyzeResult) MeetsTotalCoverage() bool
func (*AnalyzeResult) Pass ¶
func (r *AnalyzeResult) Pass() bool
type Badge ¶
type Badge struct {
FileName string
CDN badgestorer.CDN
Git badgestorer.Git
}
type Config ¶
type Config struct {
Profile string `yaml:"profile"`
LocalPrefix string `yaml:"local-prefix"`
Threshold Threshold `yaml:"threshold"`
Override []Override `yaml:"override,omitempty"`
Exclude Exclude `yaml:"exclude"`
BreakdownFileName string `yaml:"breakdown-file-name"`
GithubActionOutput bool `yaml:"github-action-output"`
Diff Diff `yaml:"diff"`
Badge Badge `yaml:"-"`
}
type FileCoverageDiff ¶
Click to show internal directories.
Click to hide internal directories.