Skip to content

Commit

Permalink
more cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyas-goenka committed Jun 17, 2024
1 parent 30f4531 commit 7391f79
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bundle/tests/validate/dead_configuration/databricks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ include:

variables:
bar:
default: conflicts with non-empty value
default: conflicts
4 changes: 2 additions & 2 deletions bundle/tests/validate/dead_configuration/resources1.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
variables:
bar:
default: conflicts with non-empty value
default: conflicts

baz:
default: conflicts with non-empty value
default: conflicts
2 changes: 1 addition & 1 deletion bundle/tests/validate/dead_configuration/resources2.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
variables:
baz:
default: conflicts with non-empty value
default: conflicts
3 changes: 0 additions & 3 deletions libs/dyn/location.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
4 changes: 2 additions & 2 deletions libs/dyn/value.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 7391f79

Please sign in to comment.