Skip to content

Commit f60d1d0

Browse files
cbleckerclaude
andcommitted
Require exactly 61 dashes for YAML header separators
Update regex to match exactly 61 dashes instead of 3+ for better consistency and error detection. This matches the actual format used in all candidate files and will help catch formatting errors. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 091db60 commit f60d1d0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

hack/verify-steering-election-tool.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,10 @@ func validateTemplateCompliance(filename string) error {
289289
}
290290

291291
// extractYAMLHeader extracts the YAML content between dash separators
292+
// The format requires exactly 61 dashes for consistency
292293
func extractYAMLHeader(content string) (string, error) {
293-
// Find the YAML header between dashes
294-
dashRegex := regexp.MustCompile(`(?s)^-{5,}\s*\n(.*?)\n-{5,}\s*\n`)
294+
// Find the YAML header between exactly 61 dashes
295+
dashRegex := regexp.MustCompile(`(?s)^-{61}\s*\n(.*?)\n-{61}\s*\n`)
295296
matches := dashRegex.FindStringSubmatch(content)
296297
if len(matches) != 2 {
297298
return "", fmt.Errorf("could not find YAML header between dashes")

0 commit comments

Comments
 (0)