{"record":{"id":"5828c7cf0dd895ed","repo":"helm/helm","slug":"version-w-5828c7","errorCode":null,"errorMessage":"version %w","messagePattern":"version %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/chart/v2/lint/rules/chartfile.go","lineNumber":156,"sourceCode":"\nfunc validateChartVersion(cf *chart.Metadata) error {\n\tif cf.Version == \"\" {\n\t\treturn errors.New(\"version is required\")\n\t}\n\n\tversion, err := semver.NewVersion(cf.Version)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"version '%s' is not a valid SemVer\", cf.Version)\n\t}\n\n\tc, err := semver.NewConstraint(\">0.0.0-0\")\n\tif err != nil {\n\t\treturn err\n\t}\n\tvalid, msg := c.Validate(version)\n\n\tif !valid && len(msg) > 0 {\n\t\treturn fmt.Errorf(\"version %w\", msg[0])\n\t}\n\n\treturn nil\n}\n\nfunc validateChartVersionStrictSemVerV2(cf *chart.Metadata) error {\n\t_, err := semver.StrictNewVersion(cf.Version)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"version '%s' is not a valid SemVerV2\", cf.Version)\n\t}\n\n\treturn nil\n}\n\nfunc validateChartMaintainer(cf *chart.Metadata) error {\n\tfor _, maintainer := range cf.Maintainers {\n\t\tswitch {\n\t\tcase maintainer == nil:","sourceCodeStart":138,"sourceCodeEnd":174,"githubUrl":"https://github.com/helm/helm/blob/2a29f1770b62844b27197d2507377361d45ad7c0/pkg/chart/v2/lint/rules/chartfile.go#L138-L174","documentation":"Lint rule applying the semver constraint \">0.0.0-0\" to the parsed version: the chart version must be strictly greater than the smallest possible 0.0.0 prerelease. If not, the first constraint-validation error message (an error value) is wrapped with %w. Practically only `version: 0.0.0` (or an equivalent-zero) fails, since anything positive passes.","triggerScenarios":"`version: \"0.0.0\"` in Chart.yaml — semver reports it does not satisfy >0.0.0-0. Scaffolding placeholders left un-bumped hit exactly this.","commonSituations":"A chart created with a placeholder zero version that was never set before publishing; automated pipelines defaulting to 0.0.0 when the tag detection fails.","solutions":["Bump the version to at least 0.0.1 (or 0.1.0) before linting/publishing.","Fix CI tag detection so 0.0.0 is never the fallback.","Treat 0.0.0 as 'unreleased' and skip `helm package`/upload steps until bumped."],"exampleFix":"# before\napiVersion: v2\nname: mychart\nversion: \"0.0.0\"   # -> version 0.0.0 is less than or equal to 0.0.0-0\n\n# after\napiVersion: v2\nname: mychart\nversion: \"0.0.1\"","handlingStrategy":"validation","validationCode":"// Reject placeholder zero versions before lint/publish\nv, err := semver.NewVersion(md.Version)\nif err != nil { return err }\nc, _ := semver.NewConstraint(\">0.0.0-0\")\nif ok, _ := c.Validate(v); !ok {\n\treturn fmt.Errorf(\"chart version %s must be > 0.0.0\", md.Version)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never publish with version 0.0.0; treat it as 'not yet released'.","Let CI bump from the git tag rather than defaulting to zero."],"tags":["helm","lint","chart-yaml","semver","version","placeholder"],"backgroundTag":null,"analyzedSha":"2a29f1770b62844b27197d2507377361d45ad7c0","analyzedAt":"2026-08-15T22:02:47.490Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}