Skip to content

Commit

Permalink
scripts: dts: Produce error for invalid yaml
Browse files Browse the repository at this point in the history
I made an alignment error in a dts binding, but the build was
successful. After some debugging I found the following warning
explaining the problem:

  '/home/casper/src/zephyrproject/zephyr/dts/bindings/gpio/
       gpio-keys.yaml' appears in binding directories but isn't valid
       YAML: while parsing a block mapping
    in "<unicode string>", line 11, column 8
  did not find expected key
    in "<unicode string>", line 18, column 9

I think this should be an error as there shouldn't be any invalid yaml.

Signed-off-by: Casper Meijn <casper@meijn.net>
  • Loading branch information
caspermeijn authored and galak committed Jun 14, 2021
1 parent aaf64e0 commit d25e5c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/dts/python-devicetree/src/devicetree/edtlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ def _init_compat2binding(self):
# representing the file)
raw = yaml.load(contents, Loader=_BindingLoader)
except yaml.YAMLError as e:
_LOG.warning(
_err(
f"'{binding_path}' appears in binding directories "
f"but isn't valid YAML: {e}")
continue
Expand Down

0 comments on commit d25e5c2

Please sign in to comment.