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

Function countOccurrences

tools/builtin.go:1338–1347  ·  view source on GitHub ↗
(fileContent, searchString string)

Source from the content-addressed store, hash-verified

1336 abs = path
1337 }
1338 cleaned := filepath.Clean(abs)
1339 if resolved, err := filepath.EvalSymlinks(cleaned); err == nil {
1340 return filepath.Clean(resolved)
1341 }
1342 current := cleaned
1343 var suffix []string
1344 for {
1345 if resolved, err := filepath.EvalSymlinks(current); err == nil {
1346 parts := append([]string{resolved}, suffix...)
1347 return filepath.Clean(filepath.Join(parts...))
1348 }
1349 parent := filepath.Dir(current)
1350 if parent == current {

Callers 1

ExecuteMethod · 0.85

Calls 3

findActualStringFunction · 0.85
normalizeQuotesFunction · 0.85
CountMethod · 0.80

Tested by

no test coverage detected