MCPcopy
hub / github.com/harness/harness / IsValid

Method IsValid

git/hunk.go:39–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37}
38
39func (h *HunkHeader) IsValid() bool {
40 oldOk := h.OldLine == 0 && h.OldSpan == 0 || h.OldLine > 0 && h.OldSpan > 0
41 newOk := h.NewLine == 0 && h.NewSpan == 0 || h.NewLine > 0 && h.NewSpan > 0
42 return !h.IsZero() && oldOk && newOk
43}
44
45func (h *HunkHeader) String() string {
46 sb := strings.Builder{}

Callers 2

IsEmptyFunction · 0.45
IsEmptyFunction · 0.45

Calls 1

IsZeroMethod · 0.95

Tested by

no test coverage detected