{"record":{"id":"a1d58f0408b2374a","repo":"GoogleContainerTools/skaffold","slug":"source-s-s-on-line-d-column-d","errorCode":null,"errorMessage":"source: %s, %s on line %d column %d","messagePattern":"source: (.+?), (.+?) on line (.+?) column (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/schema/validation/validation.go","lineNumber":841,"sourceCode":"\t\t}\n\t}\n\treturn\n}\n\nfunc wrapWithContext(config *parser.SkaffoldConfigEntry, errs ...ErrorWithLocation) []ErrorWithLocation {\n\tvar id string\n\tif config.Metadata.Name != \"\" {\n\t\tid = fmt.Sprintf(\"in module %q\", config.Metadata.Name)\n\t} else {\n\t\tid = fmt.Sprintf(\"in unnamed config[%d]\", config.SourceIndex)\n\t}\n\n\tfor i := range errs {\n\t\tif errs[i].Location == nil || errs[i].Location.StartLine == -1 {\n\t\t\terrs[i].Error = errors.Wrapf(errs[i].Error, \"source: %s, %s\", config.SourceFile, id)\n\t\t\tcontinue\n\t\t}\n\t\terrs[i].Error = errors.Wrapf(errs[i].Error, \"source: %s, %s on line %d column %d\",\n\t\t\tconfig.SourceFile, id, errs[i].Location.StartLine, errs[i].Location.StartColumn)\n\t}\n\treturn errs\n}\n\n// validateKubectlManifests\n// - validates that kubectl manifest files specified in the skaffold config exist\nfunc validateKubectlManifests(configs parser.SkaffoldConfigSet) (errs []ErrorWithLocation) {\n\tfor _, c := range configs {\n\t\tif c.IsRemote {\n\t\t\tcontinue\n\t\t}\n\t\tif len(c.Render.RawK8s) == 1 && c.Render.RawK8s[0] == constants.DefaultKubectlManifests[0] {\n\t\t\tlog.Entry(context.TODO()).Debug(\"skipping validating `kubectl` deployer manifests since only the default manifest list is defined\")\n\t\t\tcontinue\n\t\t}\n\n\t\t// validate that manifest files referenced in config exist","sourceCodeStart":823,"sourceCodeEnd":859,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/schema/validation/validation.go#L823-L859","documentation":"The located variant of wrapWithContext: it wraps a validation error with 'source: <file>, <config id> on line L column C' when the error carries a valid parse Location. This points the developer to the exact position in skaffold.yaml that failed validation.","triggerScenarios":"Any validation error from Process/validateImageNames/validateKubectlManifests whose errs[i].Location has a valid StartLine (not -1) — i.e. errors traceable to a specific token in the parsed config file.","commonSituations":"Typo'd field names or bad values at a known line of skaffold.yaml; invalid image repository names; kubectl manifest paths failing validation; hand-edited skaffold.yaml with schema violations.","solutions":["Open skaffold.yaml at the reported line/column and correct the offending value","Check image name constraints (lowercase, no underscores, valid registry) if validateImageNames flagged it","Run `skaffold fix` to auto-upgrade schema-incompatible fields","Run `skaffold diagnose` to surface all validation issues at once"],"exampleFix":"// before (skaffold.yaml line 12)\nimage: Registry/MyImage:latest\n// after\nimage: registry.example.com/myimage:latest","handlingStrategy":"validation","validationCode":"// Parse and lint skaffold.yaml against the schema before use\nparsed, err := schema.ParseConfig([]byte(cfgYAML), version)\nif err != nil {\n    return fmt.Errorf(\"invalid skaffold.yaml at line %d: %w\", lineOf(err), err)\n}","typeGuard":null,"tryCatchPattern":"if err := process(config); err != nil {\n    // message includes \"source: file, id on line L column C\"\n    return fmt.Errorf(\"skaffold validation: %w\", err)\n}","preventionTips":["Fix errors at the reported line/column in skaffold.yaml immediately after edits","Use an editor schema (JSON schema for skaffold.yaml) for inline validation","Run skaffold validation as a pre-commit hook"],"tags":["validation","skaffold-config","line-location"],"backgroundTag":"schema-validation-failed","analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}