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

Function computePadding

internal/lint/code/util.go:18–41  ·  view source on GitHub ↗
(s string, makers []string)

Source from the content-addressed store, hash-verified

16}
17
18func computePadding(s string, makers []string) int {
19 padding := 0
20
21 for _, m := range makers {
22 if strings.HasPrefix(s, m) {
23 l := utf8.RuneCountInString(m)
24
25 padding = l
26 for i, r := range s {
27 if i < l {
28 continue
29 }
30
31 if r == ' ' {
32 padding++
33 } else {
34 break
35 }
36 }
37 }
38 }
39
40 return padding
41}

Callers 7

RubyFunction · 0.85
RustFunction · 0.85
CSSFunction · 0.85
YAMLFunction · 0.85
JuliaFunction · 0.85
cStyleFunction · 0.85
PythonFunction · 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…