diff --git a/bundle/tests/validate/dead_configuration/databricks.yml b/bundle/tests/validate/dead_configuration/databricks.yml index 87caec94ec..3f0a03a9fa 100644 --- a/bundle/tests/validate/dead_configuration/databricks.yml +++ b/bundle/tests/validate/dead_configuration/databricks.yml @@ -6,4 +6,4 @@ include: variables: bar: - default: conflicts with non-empty value + default: conflicts diff --git a/bundle/tests/validate/dead_configuration/resources1.yml b/bundle/tests/validate/dead_configuration/resources1.yml index 0e6b45a821..fd18ec4046 100644 --- a/bundle/tests/validate/dead_configuration/resources1.yml +++ b/bundle/tests/validate/dead_configuration/resources1.yml @@ -1,6 +1,6 @@ variables: bar: - default: conflicts with non-empty value + default: conflicts baz: - default: conflicts with non-empty value + default: conflicts diff --git a/bundle/tests/validate/dead_configuration/resources2.yml b/bundle/tests/validate/dead_configuration/resources2.yml index e75aaed1d1..d098a78af3 100644 --- a/bundle/tests/validate/dead_configuration/resources2.yml +++ b/bundle/tests/validate/dead_configuration/resources2.yml @@ -1,3 +1,3 @@ variables: baz: - default: conflicts with non-empty value + default: conflicts diff --git a/libs/dyn/location.go b/libs/dyn/location.go index bc89f7f131..961d2f1215 100644 --- a/libs/dyn/location.go +++ b/libs/dyn/location.go @@ -11,9 +11,6 @@ type Location struct { Column int } -// Convenient constant for an empty location. -var EmptyLocation = Location{} - func (l Location) String() string { return fmt.Sprintf("%s:%d:%d", l.File, l.Line, l.Column) } diff --git a/libs/dyn/value.go b/libs/dyn/value.go index 5abc7591fe..1ce7d5e0f4 100644 --- a/libs/dyn/value.go +++ b/libs/dyn/value.go @@ -19,7 +19,7 @@ type Value struct { // All locations in the source YAML files where this value was defined. Some of // these locations may have had no effect on the final value because they were // overridden by other values at other locations. - // The ordering of the locations holds no significance. + // The ordering of the locations here holds no significance. yamlLocations []Location // Whether or not this value is an anchor. @@ -71,7 +71,7 @@ func (v Value) WithLocation(loc Location) Value { func (v Value) AppendYamlLocation(loc Location) Value { // We only keep track of non-empty locations, that is actual locations in the source YAML. - if loc == EmptyLocation { + if loc == (Location{}) { return v }