diff options
| author | Ryan <fauxpark@gmail.com> | 2023-03-02 10:56:45 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-02 10:56:45 +1100 |
| commit | 6fabc330e3bd8156e84ef3106c07e93d210c37d1 (patch) | |
| tree | 5a2e2e68c8f9a529a12ef31bd89159d2c79c3dae /lib/python/qmk/c_parse.py | |
| parent | 80c6fbad1cd25071942f44119d76d29adcccd9f3 (diff) | |
Check all keys have matrix positions when parsing C LAYOUT macros (#19781)
Diffstat (limited to 'lib/python/qmk/c_parse.py')
| -rw-r--r-- | lib/python/qmk/c_parse.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/python/qmk/c_parse.py b/lib/python/qmk/c_parse.py index 3d73e66091..83ab1d1e6d 100644 --- a/lib/python/qmk/c_parse.py +++ b/lib/python/qmk/c_parse.py | |||
| @@ -88,7 +88,9 @@ def find_layouts(file): | |||
| 88 | for i, key in enumerate(parsed_layout): | 88 | for i, key in enumerate(parsed_layout): |
| 89 | if 'label' not in key: | 89 | if 'label' not in key: |
| 90 | cli.log.error('Invalid LAYOUT macro in %s: Empty parameter name in macro %s at pos %s.', file, macro_name, i) | 90 | cli.log.error('Invalid LAYOUT macro in %s: Empty parameter name in macro %s at pos %s.', file, macro_name, i) |
| 91 | elif key['label'] in matrix_locations: | 91 | elif key['label'] not in matrix_locations: |
| 92 | cli.log.error('Invalid LAYOUT macro in %s: Key %s in macro %s has no matrix position!', file, key['label'], macro_name) | ||
| 93 | else: | ||
| 92 | key['matrix'] = matrix_locations[key['label']] | 94 | key['matrix'] = matrix_locations[key['label']] |
| 93 | 95 | ||
| 94 | parsed_layouts[macro_name] = { | 96 | parsed_layouts[macro_name] = { |
