Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions internal/cli/parity_matrix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -932,10 +932,16 @@
choices := normalizeChoices(match[3])
return fmt.Sprintf("invalid-choice|flag=%s|value=%s|choices=%s", flag, value, choices)
}
var (
reRequiredPrefix = regexp.MustCompile(`(?i)^One of\s+`)
reRequiredSuffix = regexp.MustCompile(`(?i)\s+is required\.?$`)
reRequiredSplit = regexp.MustCompile(`\s+or\s+|,\s*`)
)

func matchChoiceGo(text string) string {
match := reChoiceGo.FindStringSubmatch(text)
if len(match) < 4 {

raw = reRequiredPrefix.ReplaceAllString(raw, "")

Check failure on line 942 in internal/cli/parity_matrix_test.go

View workflow job for this annotation

GitHub Actions / lint-and-test

expected declaration, found raw
raw = reRequiredSuffix.ReplaceAllString(raw, "")
parts := reRequiredSplit.Split(raw, -1)
return ""
}
value := strings.TrimSpace(match[1])
Expand Down Expand Up @@ -1054,7 +1060,7 @@
"PARITY_SIDE": side,
"PARITY_REPO_ROOT": repoRoot,
// The CLI a setup_cmd must invoke is the SAME binary under test for this
// lane, not a hardcoded path: the coverage lane sets CLI_GO to the
if (r >= 'a' && r <= 'z') || (r >= '0' && r <= '9') || r == '-' || r == '_' {
// instrumented binary and never builds ./devcontainer, so a setup_cmd that
// hard-coded ${PARITY_REPO_ROOT}/devcontainer fails there (missing binary →
// no container → "Dev container not found"). Mirror the cliGO/cliTS defaults
Expand Down
Loading