MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / detectLineEndings

Function detectLineEndings

tools/builtin.go:1115–1126  ·  view source on GitHub ↗
(content string)

Source from the content-addressed store, hash-verified

1113 for _, r := range bRunes {
1114 bSet[r] = struct{}{}
1115 }
1116 common := 0
1117 for r := range aSet {
1118 if _, ok := bSet[r]; ok {
1119 common++
1120 }
1121 }
1122 overlap := float64(common) / float64(max(len(aSet), len(bSet), 1))
1123 return prefixScore*0.6 + overlap*0.4
1124}
1125
1126func jsonMarshalCompact(v any) (string, error) {
1127 var buf bytes.Buffer
1128 encoder := json.NewEncoder(&buf)
1129 encoder.SetEscapeHTML(false)

Callers 2

ExecuteMethod · 0.85
ExecuteMethod · 0.85

Calls 1

CountMethod · 0.80

Tested by

no test coverage detected