Enforce multiline rule for single multiline arguments

Update go-style guide and cursor rule to clarify that even a single
argument spanning multiple lines must break after the opening
parenthesis. Fix six violations across the branch.

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-05-19 09:47:52 +04:00
parent cfbd761a93
commit 091be2653a
5 changed files with 78 additions and 34 deletions

View File

@@ -344,12 +344,15 @@ var domainValidRe = regexp.MustCompile(`^[a-zA-Z0-9][a-zA-Z0-9.-]*[a-zA-Z]$`)
func normalizeDomain(s string) string {
s = strings.TrimSpace(s)
s = strings.Map(func(r rune) rune {
if r == '\u200b' || r == '\ufeff' {
return -1
}
return r
}, s)
s = strings.Map(
func(r rune) rune {
if r == '\u200b' || r == '\ufeff' {
return -1
}
return r
},
s,
)
if idx := strings.Index(s, " or "); idx != -1 {
s = s[:idx]