diff options
author | QMK Bot <hello@qmk.fm> | 2022-03-27 20:29:09 +0000 |
---|---|---|
committer | QMK Bot <hello@qmk.fm> | 2022-03-27 20:29:09 +0000 |
commit | 03f9b8db15f0ae51806734d48212b4088ffe6632 (patch) | |
tree | 207ef6188c9eb7193d4315e7ab73dc67c94cb19b /lib/python/qmk/cli | |
parent | 5f6c5cb54be9965a736b980c8c60443d971c350d (diff) | |
parent | 8c0198334c5a76b93530d6edd9b11ea99ea40018 (diff) |
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'lib/python/qmk/cli')
-rw-r--r-- | lib/python/qmk/cli/lint.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/python/qmk/cli/lint.py b/lib/python/qmk/cli/lint.py index 96593ed69b..af057b4110 100644 --- a/lib/python/qmk/cli/lint.py +++ b/lib/python/qmk/cli/lint.py @@ -116,6 +116,13 @@ def lint(cli): if not keymap_check(kb, cli.config.lint.keymap): ok = False + # Check if all non-data driven macros exist in <keyboard.h> + for layout, data in keyboard_info['layouts'].items(): + # Matrix data should be a list with exactly two integers: [0, 1] + if not data['c_macro'] and not all('matrix' in key_data.keys() or len(key_data) == 2 or all(isinstance(n, int) for n in key_data) for key_data in data['layout']): + cli.log.error(f'{kb}: "{layout}" has no "matrix" definition in either "info.json" or "<keyboard>.h"!') + ok = False + # Report status if not ok: failed.append(kb) |