mirror of
https://github.com/helm/helm.git
synced 2026-04-23 15:17:05 -04:00
Merge pull request #11628 from dastrobu/Linting_error_on_null_in_dependencies_is_misleading_#11627
change linting error messages for null values in arrays
This commit is contained in:
commit
1819f1f616
3 changed files with 4 additions and 4 deletions
|
|
@ -54,7 +54,7 @@ type Dependency struct {
|
|||
// loaded.
|
||||
func (d *Dependency) Validate() error {
|
||||
if d == nil {
|
||||
return ValidationError("dependency cannot be an empty list")
|
||||
return ValidationError("dependencies must not contain empty or null nodes")
|
||||
}
|
||||
d.Name = sanitizeString(d.Name)
|
||||
d.Version = sanitizeString(d.Version)
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ type Maintainer struct {
|
|||
// Validate checks valid data and sanitizes string characters.
|
||||
func (m *Maintainer) Validate() error {
|
||||
if m == nil {
|
||||
return ValidationError("maintainer cannot be an empty list")
|
||||
return ValidationError("maintainers must not contain empty or null nodes")
|
||||
}
|
||||
m.Name = sanitizeString(m.Name)
|
||||
m.Email = sanitizeString(m.Email)
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ func TestValidate(t *testing.T) {
|
|||
nil,
|
||||
},
|
||||
},
|
||||
ValidationError("dependency cannot be an empty list"),
|
||||
ValidationError("dependencies must not contain empty or null nodes"),
|
||||
},
|
||||
{
|
||||
&Metadata{
|
||||
|
|
@ -94,7 +94,7 @@ func TestValidate(t *testing.T) {
|
|||
nil,
|
||||
},
|
||||
},
|
||||
ValidationError("maintainer cannot be an empty list"),
|
||||
ValidationError("maintainers must not contain empty or null nodes"),
|
||||
},
|
||||
{
|
||||
&Metadata{APIVersion: "v2", Name: "test", Version: "1.2.3.4"},
|
||||
|
|
|
|||
Loading…
Reference in a new issue