{"record":{"id":"ec57cac5dcdf4b41","repo":"larksuite/cli","slug":"cannot-mix-row-digits-and-column-letters-in-on","errorCode":null,"errorMessage":"cannot mix row (digits) and column (letters) in one range","messagePattern":"cannot mix row \\(digits\\) and column \\(letters\\) in one range","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"shortcuts/sheets/lark_sheet_sheet_structure.go","lineNumber":836,"sourceCode":"\t\treturn \"\", 0, 0, fmt.Errorf(\"range is empty\") //nolint:forbidigo // intermediate error; callers wrap it into a typed flag validation error\n\t}\n\tparts := strings.Split(s, \":\")\n\tif len(parts) > 2 {\n\t\treturn \"\", 0, 0, fmt.Errorf(\"expected \\\"start:end\\\" or single element\") //nolint:forbidigo // intermediate error; callers wrap it into a typed flag validation error\n\t}\n\tdim1, idx1, err := parseA1Position(parts[0])\n\tif err != nil {\n\t\treturn \"\", 0, 0, err\n\t}\n\tif len(parts) == 1 {\n\t\treturn dim1, idx1, idx1, nil\n\t}\n\tdim2, idx2, err := parseA1Position(parts[1])\n\tif err != nil {\n\t\treturn \"\", 0, 0, err\n\t}\n\tif dim1 != dim2 {\n\t\treturn \"\", 0, 0, fmt.Errorf(\"cannot mix row (digits) and column (letters) in one range\") //nolint:forbidigo // intermediate error; callers wrap it into a typed flag validation error\n\t}\n\tif idx2 < idx1 {\n\t\treturn \"\", 0, 0, fmt.Errorf(\"end position is before start\") //nolint:forbidigo // intermediate error; callers wrap it into a typed flag validation error\n\t}\n\treturn dim1, idx1, idx2, nil\n}\n\n// parseA1Position parses a single A1 position element: pure digits → row\n// (1-based number, returned as 0-based idx); pure letters → column (letters\n// case-insensitive, \"A\" → 0, \"AA\" → 26).\nfunc parseA1Position(s string) (dimension string, idx int, err error) {\n\ts = strings.TrimSpace(s)\n\tif s == \"\" {\n\t\treturn \"\", 0, fmt.Errorf(\"position is empty\") //nolint:forbidigo // intermediate error; callers wrap it into a typed flag validation error\n\t}\n\tisDigits := true\n\tisLetters := true\n\tfor _, r := range s {","sourceCodeStart":818,"sourceCodeEnd":854,"githubUrl":"https://github.com/larksuite/cli/blob/7fd6ef3c07182257ce776cdc5a614e122d5bd4b3/shortcuts/sheets/lark_sheet_sheet_structure.go#L818-L854","documentation":"Guard in parseA1Range: the two sides of the range use different dimensions (digits for rows vs letters for columns, e.g. \"3:C\"); both sides must be the same dimension.","triggerScenarios":"Thrown at shortcuts/sheets/lark_sheet_sheet_structure.go:836 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use two digits or two letters, e.g. 3:7 or C:F"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7fd6ef3c07182257ce776cdc5a614e122d5bd4b3","analyzedAt":"2026-09-04T21:17:44.649Z","contentChangedAt":"2026-09-04T21:17:44.649Z","schemaVersion":2},"datasetVersion":"2026-09-12T02:17:10.037Z"}