Commit 061ec2da authored by Benoit Formet's avatar Benoit Formet
Browse files

config: hint about invalid name location

parent 65765872
Pipeline #22268 passed with stages
in 40 minutes and 53 seconds
......@@ -839,6 +839,10 @@ class Config:
def _create_index(self, node):
name = node.get(self.NAME_KEY)
if isinstance(name, int) or isinstance(name, str) and name[:1].isdigit():
raise ValueError(
f"Invalid name ({name}) in config file ({node.filename}). Must start with [a-zA-Z_]"
)
if name is not None and not name.startswith("$"):
if name in self._name2node:
prev_node = self.get_config(name)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment