Disallow unknown fields in soong variables file
To catch issues earlier, like when renaming a field. Test: Presubmits Change-Id: Ie04507b54cc8de3efd27ee75ff32a85ea21b5750
This commit is contained in:
parent
d5e16ac52b
commit
e1129b8cc6
1 changed files with 1 additions and 0 deletions
|
@ -370,6 +370,7 @@ func loadFromConfigFile(configurable *ProductVariables, filename string) error {
|
|||
} else {
|
||||
// Make a decoder for it
|
||||
jsonDecoder := json.NewDecoder(configFileReader)
|
||||
jsonDecoder.DisallowUnknownFields()
|
||||
err = jsonDecoder.Decode(configurable)
|
||||
if err != nil {
|
||||
return fmt.Errorf("config file: %s did not parse correctly: %s", filename, err.Error())
|
||||
|
|
Loading…
Reference in a new issue