< Summary - go-semantic-release Coverage

Line coverage
100%
Covered lines: 18
Uncovered lines: 0
Coverable lines: 18
Total lines: 42
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
String0%00100%
Higher0%00100%
IsReleasable0%00100%

File(s)

/home/runner/work/go-semantic-release/go-semantic-release/internal/domain/release_type.go

#LineLine coverage
 1package domain
 2
 3// ReleaseType represents the kind of version bump required.
 4type ReleaseType int
 5
 6const (
 7  // ReleaseNone indicates no release is needed.
 8  ReleaseNone ReleaseType = iota
 9  // ReleasePatch indicates a patch version bump.
 10  ReleasePatch
 11  // ReleaseMinor indicates a minor version bump.
 12  ReleaseMinor
 13  // ReleaseMajor indicates a major version bump.
 14  ReleaseMajor
 15)
 16
 17// String returns the human-readable name.
 418func (rt ReleaseType) String() string {
 419  switch rt {
 120  case ReleasePatch:
 121    return "patch"
 122  case ReleaseMinor:
 123    return "minor"
 124  case ReleaseMajor:
 125    return "major"
 126  default:
 127    return "none"
 28  }
 29}
 30
 31// Higher returns the higher of two release types.
 432func (rt ReleaseType) Higher(other ReleaseType) ReleaseType {
 233  if other > rt {
 234    return other
 235  }
 236  return rt
 37}
 38
 39// IsReleasable returns true if this type requires a version bump.
 240func (rt ReleaseType) IsReleasable() bool {
 241  return rt > ReleaseNone
 242}

Methods/Properties

String
Higher
IsReleasable