{"record":{"id":"23900facc9dde860","repo":"matryer/xbar","slug":"size","errorCode":null,"errorMessage":"size","messagePattern":"size","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/plugins/item_params.go","lineNumber":200,"sourceCode":"\t\tif err != nil {\n\t\t\treturn errors.Wrap(err, key)\n\t\t}\n\tcase \"key\":\n\t\tp.Key = value\n\tcase \"href\":\n\t\tp.Href = value\n\tcase \"color\":\n\t\tvar err error\n\t\tp.Color, err = parseColor(value)\n\t\tif err != nil {\n\t\t\treturn errors.Wrap(err, key)\n\t\t}\n\tcase \"font\":\n\t\tp.Font = value\n\tcase \"size\":\n\t\tval, err := parseInt(value)\n\t\tif err != nil {\n\t\t\treturn errors.Wrap(err, key)\n\t\t}\n\t\tp.Size = val\n\tcase \"shell\", \"bash\":\n\t\tp.Shell = value\n\tcase \"templateImage\":\n\t\tp.TemplateImage = value\n\tcase \"image\":\n\t\tp.Image = value\n\tcase \"terminal\":\n\t\tvar err error\n\t\tp.Terminal, err = parseBool(value)\n\t\tif err != nil {\n\t\t\treturn errors.Wrap(err, key)\n\t\t}\n\tcase \"refresh\":\n\t\tvar err error\n\t\tp.Refresh, err = parseBool(value)\n\t\tif err != nil {","sourceCodeStart":182,"sourceCodeEnd":218,"githubUrl":"https://github.com/matryer/xbar/blob/d624239058997c80118eaebe2e7f8331b3c765e0/pkg/plugins/item_params.go#L182-L218","documentation":"Returned by ItemParams.setValueByKey when the 'size' parameter value cannot be converted by parseInt. The error is wrapped with the key name ('size: ...'). The size must be an integer; non-numeric values abort parameter parsing.","triggerScenarios":"parseParamStr encounters key 'size' with a non-integer value — e.g. size=12px, size=large, size=12.5, or size= (empty).","commonSituations":"CSS-style values ('12px') copied from stylesheets; decimal sizes; locale-formatted numbers with commas; typos like 'szie' handled elsewhere but 'size=1O' (letter O).","solutions":["Set size to a plain integer, e.g. size=12 (strip 'px' or other units).","Remove spaces and ensure ASCII digits only (no thousands separators).","If a float is needed, round to an integer value."],"exampleFix":"// before\nsize=12px\n// after\nsize=12","handlingStrategy":"validation","validationCode":"func validSizeParam(v string) error {\n    v = strings.TrimSpace(v)\n    if _, err := strconv.Atoi(v); err != nil {\n        return fmt.Errorf(\"size must be an integer, got %q\", v)\n    }\n    return nil\n}","typeGuard":null,"tryCatchPattern":"params, err := parseParamStr(raw)\nif err != nil && strings.HasPrefix(err.Error(), \"size:\") {\n    log.Printf(\"invalid size value, using default: %v\", err)\n    params.Size = 0\n}","preventionTips":["Pass size as a plain integer with no units ('12', not '12px').","Strip units and round floats before writing configs.","Use ASCII digits only — no locale separators or letter/number lookalikes."],"tags":["go","parsing","plugin-params","integer"],"backgroundTag":"invalid-integer-parameter","analyzedSha":"d624239058997c80118eaebe2e7f8331b3c765e0","analyzedAt":"2026-09-02T22:38:22.007Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T02:17:09.455Z"}