MCPcopy Create free account
hub / github.com/vale-cli/vale / doneMerging

Function doneMerging

internal/lint/code/comments.go:24–33  ·  view source on GitHub ↗

doneMerging determines when we should *stop* concatenating line-scoped comments.

(curr, prev Comment)

Source from the content-addressed store, hash-verified

22// doneMerging determines when we should *stop* concatenating line-scoped
23// comments.
24func doneMerging(curr, prev Comment) bool {
25 if prev.Line != curr.Line-1 {
26 // If the comments aren't on consecutive lines, don't merge them.
27 return true
28 } else if prev.Offset != curr.Offset {
29 // If the comments aren't at the same offset, don't merge them.
30 return true
31 }
32 return false
33}
34
35func addSourceLine(line string, atEnd bool) string {
36 if line == "" {

Callers 1

coalesceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…