Browse Source

Check all keys have matrix positions when parsing C LAYOUT macros (#19781)

pull/19999/head
Ryan 1 year ago
committed by GitHub
parent
commit
6fabc330e3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      lib/python/qmk/c_parse.py

+ 3
- 1
lib/python/qmk/c_parse.py View File

@ -88,7 +88,9 @@ def find_layouts(file):
for i, key in enumerate(parsed_layout):
if 'label' not in key:
cli.log.error('Invalid LAYOUT macro in %s: Empty parameter name in macro %s at pos %s.', file, macro_name, i)
elif key['label'] in matrix_locations:
elif key['label'] not in matrix_locations:
cli.log.error('Invalid LAYOUT macro in %s: Key %s in macro %s has no matrix position!', file, key['label'], macro_name)
else:
key['matrix'] = matrix_locations[key['label']]
parsed_layouts[macro_name] = {


Loading…
Cancel
Save