{"record":{"id":"0b5d984bcedd9a34","repo":"mikefarah/yq","slug":"v-is-not-within-v-v","errorCode":null,"errorMessage":"%v is not within [%v, %v]","messagePattern":"(.+?) is not within \\[(.+?), (.+?)\\]","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/yqlib/lib.go","lineNumber":201,"sourceCode":"\tif strings.HasPrefix(digits, \"0x\") ||\n\t\tstrings.HasPrefix(digits, \"0X\") {\n\t\tnum, err := strconv.ParseInt(sign+digits[2:], 16, 64)\n\t\treturn \"0x%X\", num, err\n\t} else if strings.HasPrefix(digits, \"0o\") {\n\t\tnum, err := strconv.ParseInt(sign+digits[2:], 8, 64)\n\t\treturn \"0o%o\", num, err\n\t}\n\tnum, err := strconv.ParseInt(numberString, 10, 64)\n\treturn \"%v\", num, err\n}\n\nfunc parseInt(numberString string) (int, error) {\n\t_, parsed, err := parseInt64(numberString)\n\n\tif err != nil {\n\t\treturn 0, err\n\t} else if parsed > math.MaxInt || parsed < math.MinInt {\n\t\treturn 0, fmt.Errorf(\"%v is not within [%v, %v]\", parsed, math.MinInt, math.MaxInt)\n\t}\n\n\treturn int(parsed), err\n}\n\nfunc processEscapeCharacters(original string) string {\n\tif original == \"\" {\n\t\treturn original\n\t}\n\n\tvar result strings.Builder\n\trunes := []rune(original)\n\n\tfor i := 0; i < len(runes); i++ {\n\t\tif runes[i] == '\\\\' && i < len(runes)-1 {\n\t\t\tnext := runes[i+1]\n\t\t\tswitch next {\n\t\t\tcase '\\\\':","sourceCodeStart":183,"sourceCodeEnd":219,"githubUrl":"https://github.com/mikefarah/yq/blob/8b5af0694bb82b41d4ae180fac9972029066f90a/pkg/yqlib/lib.go#L183-L219","documentation":"parseInt successfully parsed the digit string as an int64, but the result exceeds the platform int range (beyond math.MaxInt/MinInt — typically on 32-bit builds). This is a range guard in the parse helper: the numeric literal in the expression or document is too large for the native int used by callers like repeat, pick, and slice indices.","triggerScenarios":"Thrown at pkg/yqlib/lib.go:201 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a smaller number that fits in a native int","On 32-bit platforms, run yq on a 64-bit build where int is 64 bits","For huge counts (e.g. repeat), reconsider whether the operation is practical"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8b5af0694bb82b41d4ae180fac9972029066f90a","analyzedAt":"2026-09-05T10:57:22.766Z","contentChangedAt":"2026-09-05T10:57:22.766Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}